Encoding device and method, decoding device and method, program, and recording medium

ABSTRACT

An encoding device for differential encoding/decoding a plurality of pieces of position information, represented in a rational number and arranged in the order of magnitude, includes a position information rearranging unit. The position information rearranging unit rearranges the plurality of pieces of position information in accordance with a predetermined order relationship. In the same way as position information in integer representation is encoded, the plurality of pieces of position information rearranged in accordance with the predetermined order relationship can be difference encoded.

TECHNICAL FIELD

The present invention relates to an encoding device, an encoding method,a decoding device, a decoding method, a program, and a recording mediumand, in particular, to an encoding device, an encoding method, adecoding device, a decoding method, a program, and a recording mediumfor encoding/decoding a plurality of pieces of position information, ata time, the position information relating to leaves and/or nodes in atree structure efficiently.

BACKGROUND OF THE INVENTION

Data represented in a tree structure is used in a diversity ofinformation processing fields. One of typical examples is a treestructure representation of search information of moving image contents.

FIG. 26 illustrates an example of search information having a treestructure of the moving image contents.

One single moving image content is composed of one or a plurality ofscenes, and one scene is composed of one or a plurality of shots. Eachshot is provided with data that represents features of the shot, such asmotion intensity, frequency of occurrence of color, and a summary of thecontent of the shot. A tree structure of FIG. 26 represents the searchinformation of the moving image content.

FIG. 26 illustrates the search information of the moving image content.The moving image content of FIG. 26 is composed of three scenes (#0, #1,and #2). Each scene is composed of three shots (#0, #1, and #2). Eachshot is provided with data representing motion intensity. In thisexample, the motion intensity can take three levels of high=3,intermediate=2, and low=1.

The moving image content is a root of the tree structure. Taginformation of the motion intensity representing the scene, the shot,and type of data corresponds to a node, and actual data of the motionintensity corresponds to a leaf. The scene is a first branch position ifviewed from the root, namely, a node of a first layer, and the shot is anode of a second layer. FIG. 26 illustrates an example only, and themoving image content and its search information typically have a morecomplex layered structure.

When the search information of the moving image content is handled,requests to retrieve the search data at each leaf for transmission orstorage are issued at any time. In this case, since individual retrieveddata itself cannot be identified, identification information is attachedto the data. For example, as shown in FIG. 26, data 2601 itself is amere value “1”, and can be used as the search data only whenidentification information indicating what shot number of what scenenumber the search data has is attached.

According to MPEG-7, as International Standards of multi-media contentsdescription, relating to the search information such as the moving imagecontent, identification information of search data=leaf is provided byinformation of a path of the tree extending from the root to the leaf ofthe tree structure. The path information is referred to as “Tree BranchCode” in MPEG-7. For example, data 2601 of FIG. 26 is uniquelyidentified by /scene #0/shot #0/motion intensity. Similarly, data 2602is identified by /scene #0/shot #1/motion intensity, and data 2604 isidentified by /scene #1/shot #0/motion intensity. The node is alsosimilarly represented. Identification information of each node isrepresented by information of a path of the tree from the root to thenode of the tree structure.

The information of “scene”, “shot”, and “motion intensity” of theabove-mentioned identification information represents an element type ofthe search information. Numerical information, such as “0” and “1”, isan identification number to identify one element from another when theone element is branched off from one node. Since the numericalinformation determines the position of each leaf and node in the treestructure, the numerical information is referred to as “positioninformation.” In MPEG-7, the element type information and the positioninformation are separately encoded, and handled together with the searchdata.

The identification information of each of data 2601-2609 is identical inelement type information but different in position information. MPEG-7defines a data format that allows a plurality of pieces of search datatagged with identification information different only in positioninformation to be transferred or stored together. Therefore, MPEG-7specifies the following position information encoding/decoding techniquefor differential encoding a plurality of different pieces of positioninformation.

FIG. 27 is a functional block diagram illustrating the schematicstructure of a position information encoding device that performs anMPEG-7 differential encoding process in accordance with a knowntechnique. FIG. 28 illustrates an example of position information to beencoded by an encoding device, and a position information code stringencoded by the encoding device in accordance with the known technique,more specifically, illustrates the relationship between the informationextracted from the identification information of motion intensity data2601-2609 of FIG. 26 and the position information code string obtainedas a result of encoding.

Leaf 2601 and leaf 2602 as two adjacent pieces of search data of FIG. 26are compared over a tree path extending from a root 2610 to each ofleaves 2601 and 2602. The path from the root (moving image content) to anode (scene #0) at a first layer is common to the two leaves 2601 and2602. The paths branch off from the scene #0, namely, a node (shot #0and shot #1) at a second layer. The layer immediately below thebranching is referred to as a “branch layer” to the two adjacent leaves.The branch layer of the leaf 2601 and the leaf 2602 is the second layer,namely, a shot layer. Similarly, paths of two adjacent leaves 2603 and2604 commonly share only the root (moving image content), and alreadybranch off at the nodes at the first layer (scene #0 and scene #1). Thebranch layer of the two adjacent leaves 2603 and 2604 is the firstlayer, namely, the scene layer.

The branch layer is now viewed in terms of mutual relationship of theposition information extracted from the identification information ofFIG. 28. If the values of two adjacent pieces of position information ateach layer are compared successively from an upper layer to a lowerlayer, the branch layer is a layer where the values change first. Theknown differential encoding technique is based on the premise that thevalue of the position information increases by 1 at each time, and achange in the value of the position information is converted intoinformation that indicates what layer the position information haschanged in value at. The information of the branch layer is thus encodedand the original position information is encoded. It is sufficient insuch a differential encoding technique if the number of existing branchlayers can be discriminated in the encoding. Information in thedifferential encoding technique is thus compressed compared with thecase in which the position information is directly encoded.

An initial position information encoding unit 2702 encodes initialposition information using an ordinary method rather than a differencetechnique. As shown in FIG. 28, initial position information (0,0) isrepresented by 10 bits=5 bits×2 with 5 bits per variable. At the sametime, the initial position information (0,0) is input to and stored in apreceding position information storage unit 2703 to be used for encodingnext position information (0,1).

A branch layer determining unit 2704 compares input position informationbeing encoded next with the position information stored in the precedingposition information storage unit 2703, determines a branch layer basedon the comparison results, and outputs the determination results to adifferential position information encoding unit 2705. As shown in FIG.28, second position information (0,1) being encoded next and theposition information (0,0) stored in the preceding position informationstorage unit 2703 has the identical value of the first layer, namely,the scene layer. The value of the position information of the secondlayer, namely, the shot layer is increased. This means that the pathsbranch off at the second layer=shot layer. The determination results areoutput to the differential position information encoding unit 2705.

The differential position information encoding unit 2705 selects andoutputs a position information code according to the determinationresults of the branch layer determining unit 2704. Since the branchlayer determining unit 2704 determines that the branch layer between(0,1) and (0,0) is the second layer, a code “10” indicating that thebranch layer is the second layer (a position information code indicatingan increment of 1 to the second layer) is provided as shown in FIG. 28.Similarly, a code “10” indicating the second layer is provided to thirdposition information (0,2). If the branch layer determining unit 2704compares fourth position information (1,0) with the third positioninformation (0,2), it is learned that the value of the positioninformation of the first layer, namely, the scene layer has increased.The branching takes place at the first layer=the scene layer. Therefore,a code “01” (a position information code indicating an increment of 1 tothe first layer) is provided to indicate that the branch layer is thefirst layer. The position information code string obtained by encodingto the end is the one shown in FIG. 28. The position information codestring has nothing at the end, more specifically, ends with an end code“11” indicating the end of the code.

FIG. 29 illustrates the position information code corresponding to thebranch layer of FIG. 28.

FIG. 30 is a functional block diagram illustrating the schematicstructure of a decoding device for position information by differentialencoding of the known technique.

First, an initial position information decoding unit 3001 decodesinitial position information using an ordinary decoding method. Thedecoded position information is input to and stored in a precedingposition storage unit 3002. A branch layer determining unit 3003 reads aposition information code. The branch layer determining unit 3003determines a branch layer based on the read position information code,and sends the determination results to a differential positioninformation decoding unit 3004. Upon receiving the determinationresults, the differential position information decoding unit 3004updates the value of position information stored in the precedingposition information storage unit 3002, and outputs the updated positioninformation. The updated position information is stored in the precedingposition information storage unit 3002. That process is repeated untilthe end code is read.

The branch layer determining unit 3003 reads a code “10” with thedecoded initial position information (0,0) stored in the precedingposition information storage unit 3002. Since the code “10” indicatesthe branching at the second layer, the differential position informationdecoding unit 3004 increases the value (0,0) of the second layer by 1,thereby resulting in next position information (0,1). Then, the branchlayer determining unit 3003 reads a code “01” with (0,2) decoded andstored in the preceding position information storage unit 3002. Sincethe code “01” indicates the branching at the first layer, thedifferential position information decoding unit 3004 increases theposition information (0,2) of the first layer which is stored in thepreceding position information storage unit 3002 by 1. Since the valueof the first layer has changed, position information at a layer below isset to the initial value 0. Next position information (1,0) is thusobtained. That process is performed to the end and decoding is completedwhen an end code “11” is read.

In these latter days, the above-referenced position information istypically represented by rational numbers. For example, as shown in FIG.2, all position information is represented by a rational number greaterthan 0 but smaller than 1, such as a natural number over power of 2 (thedenominator being power of 2 and the numerator being a natural number).Such a notation is introduced to make it possible to add a leaf or nodeoptionally between existing leaves or nodes.

For example, as shown in FIG. 26, another shot cannot be added betweenshot #0 and shot #1 under scene #0 in the current state. To add anothershot, the shot number below shot #1 needs to be re-numbered. On theother hand, the position information is represented in a rational numberas shown in FIG. 2. If a new shot is added between shot #(1/4) and shot#(1/2) below scene #(1/4), the new shot may be assigned positioninformation 3/8. The new shot is thus added without modifying theexisting shots.

DISCLOSURE OF THE INVENTION

The encoding/decoding technique of the position information fordifferential encoding/decoding a plurality of pieces of positioninformation defined in the aforementioned MPEG-7 at a time is based onthe premise that the position information is provided in integer number,and that an interval between adjacent pieces of position information isuniform, namely, 1. Based on this premise, only information relating tothe branch layer is encoded as encode information.

The above-mentioned position information represented in the rationalnumber allows the interval between adjacent pieces of positioninformation to be varied optionally. For example, position informationnext to position 1/4 can be 1/2 or 3/8 or 5/16. The premise establishedon the position information represented in the aforementioned integerrepresentation is not applicable to the position information in therational number representation. For this reason, the encoding/decodingtechnique for a plurality of pieces of position information defined inMPEG-7 has not been directly applicable to the position information inthe rational number representation.

The present invention has been developed in view of the above situation,and it is an object of the present invention to provide an encodingdevice, an encoding method, a decoding device, a decoding method, anencoding program, a decoding program, and a computer-readable recordingmedium recording the programs for differential encoding/decoding aplurality of leaves and/or nodes of position information represented inrational numbers.

A first invention of the present application relates to an encodingdevice for encoding a plurality of pieces of position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, and comprises rearranging unit for rearranging, in apredetermined order relationship, the plurality of pieces of positioninformation to be encoded, determining unit for determining, inaccordance with the predetermined order relationship, a branch layer oftwo consecutive pieces of position information from among the pluralityof pieces of position information output from the rearranging unit, andencoding unit for outputting a code corresponding to the branch layer.

A second invention of the present application relates to an encodingdevice for encoding a plurality of pieces of position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, the plurality of pieces of position information to beencoded being arranged in a predetermined order relationship, andcomprises determining unit for determining, in accordance with thepredetermined order relationship, a branch layer of two consecutivepieces of position information from among the plurality of pieces ofposition information to be encoded, and encoding unit for outputting acode corresponding to the branch layer.

A third invention of the present application relates to the encodingdevice according to the first or second invention, wherein the pluralityof pieces of position information are rational number positioninformation represented by a rational number, and wherein thepredetermined order relationship is determined by the order of magnitudeof resolution of the rational number.

A fourth invention of the present application relates to an encodingdevice for encoding a plurality of pieces of position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, and comprises incremental width determining unit fordetermining an incremental width of the value of the positioninformation based on the plurality of pieces of position information tobe encoded, incremental width encoding unit for encoding the incrementalwidth and outputting the encoded incremental width, determining unit fordetermining a branch layer of two consecutive pieces of positioninformation from among the plurality of pieces of position informationto be encoded, and branch layer encoding unit for outputting a codecorresponding to the branch layer.

A fifth invention of the present application relates to the encodingdevice according to the fourth invention, wherein the plurality ofpieces of position information are rational number position informationrepresented by a rational number, and wherein the incremental width isdetermined on a per branch layer basis so that all the plurality ofpieces of position information are encoded.

A sixth invention of the present application relates to the encodingdevice according to any one of the first through fifth inventions,wherein the tree structure represents search information, and whereinthe leaves or nodes corresponding to the plurality of pieces of positioninformation to be encoded correspond to elements of the same typecontained in the search information.

A seventh invention of the present application relates to an encodingmethod for encoding a plurality of pieces of position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, and comprises a rearranging step of rearranging, inaccordance with a predetermined order relationship, the plurality ofpieces of position information to be encoded, a determining step ofdetermining, in accordance with the predetermined order relationship, abranch layer of two consecutive pieces of position information fromamong the plurality of pieces of position information output in therearranging step, and an encoding step of outputting a codecorresponding to the branch layer.

An eighth invention of the present application relates to an encodingmethod for encoding a plurality of pieces of position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, the plurality of pieces of position information to beencoded being arranged in accordance with a predetermined orderrelationship, and comprises a determining step of determining, inaccordance with the predetermined order relationship, a branch layer oftwo consecutive pieces of position information from among the pluralityof pieces of position information to be encoded, and an encoding step ofoutputting a code corresponding to the branch layer.

A ninth invention of the present application relates to the encodingmethod according to the seventh or eighth invention, wherein theplurality of pieces of position information are rational number positioninformation represented by a rational number, and wherein thepredetermined order relationship is determined by the order of magnitudeof resolution of the rational number.

A tenth invention of the present application relates to an encodingmethod for encoding a plurality of pieces of position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, and comprises an incremental width determining step ofdetermining an incremental width of the value of the positioninformation based on the plurality of pieces of position information tobe encoded, an incremental width encoding step of encoding theincremental width and outputting the encoded incremental width, adetermining step of determining a branch layer of two consecutive piecesof position information from among the plurality of pieces of positioninformation to be encoded, and a branch layer encoding step ofoutputting a code corresponding to the branch layer.

An eleventh invention of the present application relates to the encodingmethod according to the tenth invention, wherein the plurality of piecesof position information are rational number position informationrepresented by a rational number, and wherein the incremental width isdetermined on a per branch layer basis so that all the plurality ofpieces of position information are encoded.

A twelfth invention of the present application relates to the encodingmethod according to any one of the seventh through eleventh inventions,wherein the tree structure represents search information, and whereinthe leaves or nodes corresponding to the plurality of pieces of positioninformation to be encoded correspond to elements of the same typecontained in the search information.

A thirteenth invention of the present application relates to a decodingdevice for decoding a string of position information code composed of aplurality of pieces of encoded position information corresponding to aplurality of leaves and/or nodes at the same layer in a tree structure,and comprises storage unit for successively storing decoded positioninformation, determining unit for determining a branch layer of twoconsecutive pieces of position information based on the positioninformation code, and decoding unit for updating the value of theposition information, stored in the storage unit, corresponding to thebranch layer by one notch in accordance with a predetermined orderrelationship.

A fourteenth invention of the present application further comprisesrearranging unit for rearranging the plurality of pieces of decodedposition information in accordance with the order of magnitude fromlarge to small.

A fifteenth invention of the present application relates to the decodingdevice according to the fourteenth invention, wherein the rearrangingunit further comprises calculating unit for calculating a serial numberassigned to each piece of the decoded position information, the serialnumber representing the order of magnitude.

A sixteenth invention of the present application relates to the decodingdevice according to any one of the thirteen through fifteenthinventions, wherein the plurality of pieces of position information arerational number position information represented by a rational number,and wherein the predetermined order relationship is determined by theorder of magnitude of resolution of the rational number.

A seventeenth invention of the present application relates to a decodingdevice for decoding a string of position information code composed of aplurality of pieces of encoded position information corresponding to aplurality of leaves and/or nodes at the same layer in a tree structure,and comprises incremental width decoding unit for decoding anincremental width of the value of the position information, storage unitfor successively storing the decoded position information, determiningunit for determining a branch layer of two consecutive pieces ofposition information based on the position information code, andposition information decoding unit for updating the value of theposition information, stored in the storage unit , corresponding to thebranch layer by the incremental width.

An eighteenth invention of the present application relates to thedecoding device according to any one of the thirteenth throughseventeenth inventions, wherein the tree structure represents searchinformation, and wherein the leaves or nodes corresponding to theposition information to be decoded correspond to elements of the sametype contained in the search information.

A nineteenth invention of the present application relates to a decodingmethod for decoding a string of position information code composed of aplurality of pieces of encoded position information corresponding to aplurality of leaves and/or nodes at the same layer in a tree structure,and comprises a storage step of successively storing decoded positioninformation, a determining step of determining a branch layer of twoconsecutive pieces of position information based on the positioninformation code, and a decoding step of updating the value of theposition information, stored in the storage step, corresponding to thebranch layer by one notch in accordance with a predetermined orderrelationship.

A twentieth invention of the present application relates to the decodingmethod according to the nineteenth invention, further comprises arearranging step of rearranging the plurality of pieces of decodedposition information in accordance with the order of magnitude.

A twenty-first invention of the present application relates to thedecoding method according to the twentieth invention, wherein therearranging step further comprises a calculating step of calculating aserial number assigned to each piece of decoded position information,the serial number representing the order of magnitude.

A twenty-second invention of the present application relates to thedecoding method according to any one of the nineteenth throughtwenty-first inventions, wherein the plurality of pieces of positioninformation are rational number position information represented by arational number, and wherein the predetermined order relationship isdetermined by the order of magnitude of resolution of the rationalnumber.

A twenty-third invention of the present application relates to adecoding method for decoding a string of position information codecomposed of a plurality of pieces of encoded position informationcorresponding to a plurality of leaves and/or nodes at the same layer ina tree structure, and comprises an incremental width decoding step ofdecoding an incremental width of the value of the position information,a storage step of successively storing the decoded position information,a determining step of determining a branch layer of two consecutivepieces of position information based on the position information code,and a position information decoding step of updating the value of theposition information, stored in the storage step, corresponding to thebranch layer by the incremental width.

A twenty-fourth invention of the present application relates to thedecoding method according to any one of the nineteenth throughtwenty-third inventions, wherein the tree structure represents searchinformation, and wherein the leaves or nodes corresponding to theposition information to be decoded correspond to elements of the sametype contained in the search information.

A twenty-fifth invention of the present application relates to a programfor causing a computer to function as the encoding device according toany one of the first through sixth inventions.

A twenty-sixth invention of the present application relates to a programfor causing a computer to perform the encoding method according to anyone of the seventh through twelfth inventions.

A twenty-seventh invention of the present application relates to aprogram for causing a computer to function as the decoding deviceaccording to any one of the thirteen through eighteenth inventions.

A twenty-eighth invention of the present application relates to aprogram for causing a computer to perform the decoding method accordingto any one of the nineteenth through twenty-fourth inventions.

A twenty-ninth invention of the present application relates to acomputer-readable recording medium storing the program according to anyone of the twenty-fifth through twenty-eighth inventions.

In accordance with the present invention, a plurality of pieces ofposition information are represented in rational numbers, the orderrelationship of which is not uniquely determined in terms of the orderof magnitude. A new order relationship of predetermined values of theplurality of pieces of position information is set up, and the pluralityof pieces of position information are rearranged in accordance with thenew order relationship. The plurality of pieces of position informationare thus encoded/decoded using the differential encoding technique inthe same way as the position information in the integer representationis encoded/decoded. Even when the plurality of pieces of positioninformation to be encoded/decoded are not serial in the new orderrelationship subsequent to the rearrangement, the plurality of pieces ofposition information can be encoded/decoded using the differentialencoding technique by notifying of information indicative of deficiencyposition.

In accordance with the present invention, a plurality of pieces ofposition information are represented in rational numbers, the orderrelationship of which is not uniquely determined in terms of the orderof magnitude. The incremental width of the value in terms of the orderof magnitude is determined, and encoded as a code of positioninformation. The plurality of pieces of position information are thusencoded/decoded using the differential encoding technique in the sameway as the position information in the integer representation isencoded/decoded. A deficiency position, which is originallynon-existent, may take place when the value is increased by theincremental width of the given value. Even in such a case, the pluralityof pieces of position information can be encoded/decoded using thedifferential encoding technique by notifying of information indicativeof deficiency position.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram illustrating the schematicstructure of an encoding device for encoding position information inaccordance with a first embodiment of the present invention.

FIG. 2 illustrates an example of search information having a treestructure with the position information represented in a rationalnumber.

FIG. 3 illustrates identification information corresponding to each dataof the search information of FIG. 2, position information extracted fromthe identification information, and position information rearranged fromthe extracted position information in accordance with the firstembodiment of the present invention.

FIG. 4A illustrates the order relationship of the value of the positioninformation represented in rational numbers in accordance with the firstembodiment of the present invention.

FIG. 4B illustrates a determination method for determining the orderrelationship of FIG. 4A in accordance with the first embodiment of thepresent invention.

FIG. 5 illustrates an example of the position information to be encodedby and a position information code string encoded by one example of theposition information encoding device in accordance with the firstembodiment of the present invention.

FIG. 6 illustrates the position information code of FIG. 5 used in theexample of the position information encoding device in accordance withthe first embodiment of the present invention.

FIG. 7 illustrates another example of the search information having atree structure with the position information represented in a rationalnumber.

FIG. 8 illustrates identification information corresponding to each dataof the search information of FIG. 7, position information extracted fromthe identification information, and position information rearranged fromthe extracted position information in accordance with the firstembodiment of the present invention.

FIG. 9 illustrates another example of position information to be encodedby and a position information code string encoded by one example of theposition information encoding device in accordance with the firstembodiment of the present invention.

FIG. 10 is a flowchart illustrating the position information encodingmethod in accordance with the first embodiment of the present invention.

FIG. 11 is a functional block diagram illustrating the schematicstructure of a position information decoding device in accordance withthe first embodiment of the present invention.

FIG. 12 illustrates an operation example of the position informationdecoding device that rearranges the position information during decodingin accordance with the first embodiment of the present invention.

FIG. 13 is a functional block diagram of the position informationdecoding device that rearranges the position information during decodingin accordance with the first embodiment of the present invention.

FIG. 14 illustrates an example of summing order information that ishandled by the position information decoding device that rearranges theposition information during decoding in accordance with the firstembodiment of the present invention.

FIG. 15 illustrates another example of summing order information that ishandled by the position information decoding device that rearranges theposition information during decoding in accordance with the firstembodiment of the present invention.

FIG. 16 is a flowchart illustrating a decoding method of the positioninformation in accordance with the first embodiment of the presentinvention.

FIG. 17 is a functional block diagram illustrating the schematicstructure of a position information encoding device in accordance with asecond embodiment of the present invention.

FIG. 18 illustrates an example of position information to be encoded byand a position information code string encoded by one example of theposition information encoding device in accordance with the secondembodiment of the present invention.

FIG. 19 illustrates another example of search information having a treestructure with the position information represented in a rationalnumber.

FIG. 20 illustrates another example of position information to beencoded by and a position information code string encoded by one exampleof the position information encoding device in accordance with thesecond embodiment of the present invention.

FIG. 21 illustrates yet another example of position information to beencoded by and a position information code string encoded by one exampleof the position information encoding device in accordance with thesecond embodiment of the present invention.

FIG. 22 is a flowchart illustrating a position information encodingmethod in accordance with the second embodiment of the presentinvention.

FIG. 23 is a functional block diagram illustrating the schematicstructure of a position information decoding device in accordance withthe second embodiment of the present invention.

FIG. 24 is a flowchart illustrating a position information decodingmethod in accordance with the second embodiment of the presentinvention.

FIG. 25 illustrates the structure example of a widely availableinformation processing device shown to explain the device of the presentinvention.

FIG. 26 illustrates one example of search information having a treestructure for moving image contents in accordance with the known art.

FIG. 27 is a functional block diagram illustrating the schematicstructure of an MPEG-7 position information encoding device inaccordance with the known art.

FIG. 28 illustrates one example of position information to be encoded byand a position information code string encoded by the positioninformation encoding device of the known art.

FIG. 29 illustrates the position information code of FIG. 28.

FIG. 30 is a functional block diagram illustrating the schematicstructure of a position information decoding device of the known art.

PREFERRED EMBODIMENTS OF THE INVENTION First Embodiment

A position information encoding device of a first embodiment of thepresent invention is described below with reference to FIGS. 1 through9.

FIG. 1 is a functional block diagram illustrating the schematicstructure of the position information encoding device in accordance withthe first embodiment of the present invention.

The position information encoding device of the first embodiment of thepresent invention comprises a position information rearranging unit 101,an initial position information encoding unit 102, a preceding positioninformation storage unit 103, a branch layer determining unit 104, and adifferential position information encoding unit 105. As previouslydiscussed, element type information and position information areseparately encoded in accordance with MPEG-7, and are handled togetherwith search data. The present invention relates to the encoding of theposition information. The encoding of the position information inaccordance with the present invention is not limited to the encodingspecified by MPEG-7. The present invention is applicable to an encodingdevice that performs an encoding process including position informationencoding.

FIG. 2 illustrates an example of search information having a treestructure with the position information represented in a rationalnumber.

As shown in FIG. 2, the present embodiment encodes and decodes positioninformation in a tree structure represented in rational numbers. Itshould be noted that the encoding/decoding device and method of thepresent invention are also applicable to the position information in atree structure represented in an integer number. FIG. 2 illustrates thesearch information corresponding to a moving image content. The movingimage content 210 is composed of three scenes, each scene is composed ofthree shots, and each shot is provided with search data representing amotion intensity.

FIG. 3 illustrates identification information corresponding to each dataof the search information of FIG. 2, position information extracted fromthe identification information, and position information rearranged fromthe extracted position information in accordance with the firstembodiment of the present invention. Identification information 301corresponding to each search data 201-209 contained in the searchinformation of FIG. 2 and position information 302 extracted from theidentification information 301 are shown in FIG. 3.

The position information that undergoes the encoding and decodingoperations of the present invention is contained in a plurality ofpieces of identification information identical in element typeinformation but different in position information only as shown in FIG.3. FIG. 2 illustrates one example of the search information of themoving image content. Actual moving image content has a complex layerstructure in which one scene is recursively decomposed into a pluralityof scenes, each scene further being decomposed into a plurality ofscenes. The search information has often complex layer structureaccordingly. The search data may be attached not only to each shot butalso to each scene or the entire moving image content. The positioninformation encoding and decoding process of the present invention isalso applicable to search information having such a complex layerstructure. As shown in FIG. 3, position information corresponding to thesearch data=leaf is extracted. The same is true of nodes. Morespecifically, if a plurality of pieces of identification informationobtained in accordance with a plurality of search data=leaves or aplurality of nodes, contained in the search information, are formed ofthe same element type information but are different in positioninformation only, the position information encoding and decoding processof the present invention is applicable to the plurality of pieces ofidentification information. The position information encoding anddecoding process of the present invention is applicable in principle tosearch information of multi-media contents such as an audio content ortext, other than moving image content, or information other than thesearch information, as long as these pieces of information have a treestructure.

The most unique functional structure of the position informationencoding device of the present embodiment of FIG. 1 lies in the positioninformation rearranging unit 101 arranged prior to an encoding stage.The process of the position information rearranging unit 101 isdescribed below.

If each position information to be encoded is represented in a rationalnumber, the known differential encoding cannot be performed on theposition information. This is because when a first piece of positioninformation is followed by a second piece of position information in theposition information represented in the rational number, the value ofthe second piece of position information cannot be uniquely identifiedfrom the value of the first piece. If in the integer numberrepresentation, the value of next position information is automaticallyuniquely determined, for example, 0 is followed by 1, 1 is followed by2, and so on. If in the rational number representation on the otherhand, position information 1/4 could be followed by 1/2 or 3/8 or 5/16.

FIGS. 4A and 4B illustrate the order relationship of the value of theposition information represented in rational numbers and thedetermination method of the order relationship in accordance with thefirst embodiment of the present invention.

To overcome the above-mentioned drawback, a predetermined orderrelationship is set up for the value of the position informationrepresented in a rational number in accordance with the presentinvention. In this example, the position information represented in arational number of “a natural number over power of 2 (the denominatorbeing power of 2 and the numerator being a natural number)” is used. Theorder relationship of the value of the position information is definedas “1/2→1/4→3/4→1/8→3/8→5/8→7/8→1/16 . . . ” (see FIG. 4A).

This ordering is performed as shown in FIG. 4B (i) “a natural numberover power of 2” greater than 0 but smaller than 1 are sequenced fromlow resolution to high resolution, and (ii) within the same resolution,the value is sequenced in the order of magnitude from a small value to alarge value. The resolution to the rational number, namely, “a naturalnumber over power of 2” has the following meaning. A value within arange from 0 to 1 is halved, the halved value is further halved, and soon to determine a rational number. The number of divisions is theresolution. A rational number obtained from a smaller number ofdivisions has lower resolution, while a rational number obtained from alarge number of divisions has higher resolution. Simply stated, thevalue of power of 2 as the denominator corresponds to the resolution. Inthis definition, the position information is sequenced in the order ofthe rational number starting with an initial value 1/2 to higherresolution. Individual rational numbers that are not uniquely identifiedby the relationship of magnitude are clearly defined, in other words, anext value following a first value is distinctly defined.

The position information rearranging unit 101 rearranges each positioninformation in accordance with the newly defined order relationship ofFIG. 4A. Position information 303 of FIG. 3 is obtained by rearrangingposition information 302 of FIG. 3 in accordance with the orderrelationship of FIG. 4A. The rearrangement is performed based on thevalue of the position information assigned to each layer so that theposition information is lined at an upper layer in the orderrelationship of FIG. 4A. The position information having the same valueswithin the same layer are rearranged in the order relationship of FIG.4A at a layer below the first layer. This operation is recursivelyperformed. Rather than comparing the values of the position informationat each layer, the values of position information at all layers in theleaves or the nodes are handled together to rearrange the positioninformation. For example, the relationship of magnitude between theposition information at one leaf or node and the position information atanother leaf or node is defined. In accordance with the relationship ofmagnitude, an existing sort algorithm such as the quicksort is appliedto the position information of the leaves or nodes to rearrange theposition information. Any rearrangement method is perfectly acceptableas long as the rearrangement method executes a rearrangement similar tothe above method. The present invention is not limited to theabove-referenced rearrangement methods.

In accordance with the present embodiment, all the position informationare extracted and arranged in the order of magnitude. The positioninformation is then rearranged. The position information rearrangingunit 101 does not necessarily perform the above-referenced step-by-stepprocess. For example, at or prior to the stage of extracting theposition information, the search data is successively extracted inaccordance with the order of FIG. 4A when the search data to be treatedis selected and extracted in a group. Such a process is broadlyconsidered as one of rearrangement processes performed by the positioninformation rearranging unit 101.

After the position information rearranging unit 101 rearranges theposition information, the differential encoding is performed in the sameprocess as the known encoding process of the position informationrepresented in the integer number. The initial position informationencoding unit 102 encodes initial position information subsequent torearrangement in an ordinary method rather than the differencetechnique. The initial position information is stored in the precedingposition information storage unit 103 to be used in encoding nextposition information.

FIG. 5 illustrates an example of the position information to be encodedby and a position information code string encoded by one example of theposition information encoding device in accordance with the firstembodiment of the present invention.

The operation of the position information encoding device is describedbelow with reference to FIG. 5 based on the rearranged positioninformation identical to that of FIG. 3 and the position informationcode string that is obtained by encoding the rearranged positioninformation.

The initial position information (1/2, 1/2) subsequent to therearrangement has no preceding position information required to performthe differential encoding, and is thus encoded using an ordinary method.As shown in FIG. 5, the encoding process is performed using 10 bits=5bits×2 with 5 bits per variable. In the present invention, no furtherdiscussion is provided concerning the encoding method relating to theinitial position information.

The preceding position information storage unit 103 records the positioninformation processed in a preceding cycle, and outputs and provides therecorded position information to encode next position information. Asshown in FIG. 5, position information to be encoded subsequent to(1/2,1/2) is (1/2,1/4). When (1/2,1/4) is encoded, the precedingposition information storage unit 103 stores position information(1/2,1/2).

The branch layer determining unit 104 compares input positioninformation with the position information stored in the precedingposition information storage unit 103, determines the layer at which thetwo pieces of position information have branched off from each other,and outputs the determination results to the differential positioninformation encoding unit 105. Based on the determination results outputfrom the branch layer determining unit 104, the differential positioninformation encoding unit 105 outputs a position information codecorresponding to the branch layer.

Two pieces of position information, namely, the input positioninformation and the position information stored in the precedingposition information storage unit 103 are traced along paths from theroot to leaves in the tree of the search information. The paths branchoff into different nodes or leaves at the branch layer. Simply stated,the value of the position information is traced from an upper layer to alower layer as shown in FIG. 5, and the branch layer is the one at whichthe value of the position information first changes.

For example, if the input position information is (1/2,1/4), and theposition information stored in the preceding position informationstorage unit 103 is (1/2,1/2), the values are identical at the firstlayer, and the values are different at the second layer. This means thatthe branching takes place at the second layer, namely, the shot layer,and that the values are identical at the upper layer, namely, at thescene layer. The branch layer determining unit 104 thus outputsinformation indicative of the second layer as the determination results.

More precisely, it is necessary to check that the position informationat the branch layer, namely, the position information at the shot layeris updated correctly from 1/2 to 1/2 by one notch in accordance with theorder relationship of FIG. 4A. If it is determined that the updating isnot correct, the operation to be performed is described below in anotherexample with reference to FIGS. 7 through 9.

If the input position information is (1/4,1/2) and the positioninformation stored in the preceding position information storage unit103 is (1/2,3/4), these two pieces of position information are alreadydifferent at the first layer. This means that the branching takes placeat the first layer, namely, the scene layer. The branch layerdetermining unit 104 thus outputs information indicative of the firstlayer as the determination results.

More precisely, it is necessary to check that the position informationat the branch layer, namely, the position information at the scene layeris updated correctly from 1/2 to 1/4 by one notch in the orderrelationship of FIG. 4A. Since the branching takes place at the scenelayer, it is necessary to check that the position information at a layerlower than the scene layer, namely, the shot layer takes an initialvalue 1/2. Since the branching takes place at the upper layer, namely,at the different node, the layer below the node must be assigned newposition information starting with an initial value to its node or leaf.The operation to be performed when the position information at the shotlayer is other than the initial value 1/2 is also described below inanother example with reference to FIGS. 7 through 9.

Based on the determination results output from the branch layerdetermining unit 104, the differential position information encodingunit 105 outputs a position information code corresponding to the branchlayer. If the position information to be encoded is (1/2,1/4) and thepreceding position information is (1/2,1/2) as shown in FIG. 5, thedifferential position information encoding unit 105 outputs, in responseto the determination results from the branch layer determining unit 104,a position information code “10” indicating that the second layer is thebranch layer. Since the branch layer is the second layer, the positioninformation code “10” means that the value of the position informationat the second layer is increased by one notch in accordance with theorder relationship of FIG. 4A during decoding. Alternatively, if theposition information to be encoded is (1/4,1/2) and the precedingposition information is (1/2,3/4), the differential position informationencoding unit 105 outputs, in response to the determination results ofthe branch layer determining unit 104, a position information code “01”indicating that the branch layer is the first layer. Since the firstlayer is the branch layer, the position information code “01” means thatthe value of the position information at the first layer is increased byone notch in accordance with the order relationship of FIG. 4A duringdecoding, and that the value of the position information at a layerbelow the first layer, namely, the second layer is set to the initialvalue 1/2 in the order relationship of FIG. 4A.

FIG. 6 illustrates the position information code of FIG. 5 used in theexample of the position information encoding device in accordance withthe first embodiment of the present invention.

The position information code shown in FIG. 6 indicates the layer atwhich the tree corresponding to the encoded position information andposition information processed prior to the first position informationbranches off. The bit length of the code is determined by the number ofbranchable layers in the tree structure. The number of pieces ofposition information contained in the identification informationattached to the search data, namely, the number of elements of thesearch information taking the position information is the number ofbranchable layers.

When the position information contained in the identificationinformation of the search data is encoded, the element type informationis encoded together with the position information. The encoded elementtype information is typically stored or transmitted together with theencoded position information. Therefore, by referencing the element typeinformation, the number of branchable layers in the encoding anddecoding operations can be learned. Without the need for notifying thebit length of the code, the bit length of the code in the encoding anddecoding operations can be learned. On the other hand, when the positioninformation unassociated with information indicative of the number ofbranchable layers, such as the element type information, is encoded,information indicative of the bit length of the code may be generatedand then stored or transmitted together with the encoded positioninformation. The determination of the bit length of the code isperformed in a process separate from the encoding process of theencoding device of FIG. 1 and thus is not shown.

The number of branchable layers (the number of elements having positioninformation) is 2 in the identification information 301 of FIG. 3. Thecode has a representable minimum bit length of 4=<number of layers> of2+<deficiency codes> of 1+<end code> of 1, namely, as a 2 bit code.

The deficiency code “00” is a special code indicating that the positioninformation contains a missing portion. A deficiency code in theposition information in the identification information corresponding tothe search data means that no corresponding search data is available ata location updated by a position information code following thedeficiency code. The deficiency code will be described later in detailwith reference to FIGS. 7 through 9.

After last position information to be encoded, namely, positioninformation (3/4,3/4) of FIG. 5 is encoded and output, the end code “11”indicating that no further position information is available is outputand the encoding process ends.

All position information of data 201-209 contained in the tree isencoded in this example. However, all position information contained inthe tree is not always encoded. A portion of the tree structure may beextracted for encoding. Position information in the tree structure inlater time can be extracted. For example, in order to encode only thesecond and third scenes other than the first scene of FIG. 2, theinitial position information is replaced with the front of the secondscene. Position information in earlier time only in the tree structurecan be encoded. For example, in order to encode only the first andsecond scenes other than the third scene of FIG. 2, the end code isissued to end the encoding operation at the moment the positioninformation contained in the first and second scenes is encoded. Toextract the tree structure intermediate time, these steps are combined.The encoding front position to be modified and the encoding end positionthat is forced by the end code can be set at any location in the treestructure.

The position information encoding of the tree structure having a missingportion is described below with reference to FIGS. 7 through 9.

FIG. 7 illustrates another example of the search information having atree structure with the position information represented in a rationalnumber. FIG. 8 illustrates identification information corresponding toeach data of the search information of FIG. 7, position informationextracted from the identification information, and position informationrearranged from the extracted position information in accordance withthe first embodiment of the present invention. FIG. 9 illustratesanother example of position information to be encoded by and a positioninformation code string encoded by one example of the positioninformation encoding device in accordance with the first embodiment ofthe present invention.

Position information of data 701-707 contained in the search informationcorresponding to the moving image content 710 of FIG. 7 is encoded. Thesearch information of FIG. 7 has missing portions, namely, has no searchdata representing the motion intensity at shots corresponding toposition information (1/2,1/4) and (3/4,1/2). As FIG. 3, FIG. 8illustrates identification information 801 corresponding to data701-707, position information 802 extracted from the identificationinformation, and position information 803 into which the positioninformation 802 is rearranged in accordance with the order relationshipof FIG. 4A. FIG. 9 illustrates the rearranged position information whichis identical with that of FIG. 8 and the generated position informationcode string.

The encoding operation of the position information (1/2,3/4) isdescribed below with reference to FIG. 9.

At the moment the branch layer determining unit 104 receives theposition information (1/2,3/4), the preceding position informationstorage unit 103 stores position information (1/2,1/2) processed at thepreceding cycle. The branch layer is determined based on this precedingposition information.

The two pieces of position information (1/2,1/2) and (1/2,3/4) are equalin the first layer value but different in the second layer value. Thismeans that the branching takes place at the second layer. It isdetermined whether the value of the position information at the secondlayer is updated by one notch in accordance with the order relationshipof FIG. 4A. In the order relationship of FIG. 4A, 1/2 is followed by1/4. In practice, however, the input position information is 3/4. Thismeans that an empty position, namely, a missing portion is present. Thebranch layer determining unit 104 outputs, to the differential positioninformation encoding unit 105, information indicating that the branchlayer is the second layer, and information indicating that the missingportion is present. The branch layer determining unit 104 also generatesposition information (1/2,1/4) subsequent to (1/2,1/2) on the assumptionthat no missing portion occurs, and transfers the position information(1/2,1/4) to the preceding position information storage unit 103 forrecording. Under this state, the position information (1/2,3/4) isencoded again.

Upon receiving the determination results from the branch layerdetermining unit 104, the differential position information encodingunit 105 learns that the missing portion is contained and that thebranch layer is the second layer. The differential position informationencoding unit 105 then outputs the corresponding deficiency code “00”and the position information code “10”.

The preceding position information storage unit 103 stores (1/2,1/4)that is generated by the branch layer determining unit 104 at the moment(1/2,3/4) is encoded again. Two pieces of position information (1/2,1/4)and (1/2,3/4) are equal in the value of the first layer but different inthe value of the second layer. This means that the branching takes placeat the second layer. It is further learned that the value of theposition information at the second layer is 3/4 that is correctlyshifted from 1/4 by one notch in accordance with the order relationshipof FIG. 4A. The branch layer determining unit 104 thus transfers, to thedifferential position information encoding unit 105, only informationindicating that the branch layer is the second layer. Based on thedetermination results from the branch layer determining unit 104, thedifferential position information encoding unit 105 outputs the positioninformation code “10” indicative of the second layer.

FIG. 9 illustrates the operation of encoding position information(3/4,1/4).

The preceding position information storage unit 103 stores the positioninformation (1/4,3/4). processed in a preceding step at the moment thebranch layer determining unit 104 receives the position information(3/4,1/4).

Since two pieces of position information (1/4,3/4) and (3/4,3/4) aredifferent in the value of the first layer, the branching takes place atthe first layer. It is thus learned that the position information at thefirst layer is 3/4 that is correctly shifted from 1/4 by one notch inaccordance with the order relationship of FIG. 4A. It is here determinedwhether the value of the position information at the second layerbecomes the initial value 1/2 in accordance with the order relationshipof FIG. 4A. The input position information of 1/4 shows that theposition information is deficient or missing. The branch layerdetermining unit 104 outputs, to the differential position informationencoding unit 105, information indicating that the branch layer is thefirst layer, and information indicating that the missing portion iscontained. At the same time, the branch layer determining unit 104generates position information (3/4,1/2) on the assumption that nodeficiency took place, and transfers the position information (3/4,1/2)to the preceding position information storage unit 103 for recording.Under this state, the position information (3/4,1/4) is encoded again.

Based on the determination results from the branch layer determiningunit 104, the differential position information encoding unit 105 learnsthat the deficiency is contained and that the branch layer is the firstlayer, and outputs the corresponding deficiency code “00” and theposition information code “01”.

The position information, which is stored in the preceding positioninformation storage unit 103 at the moment the position information(3/4,1/4) is encoded again, is the (3/4,1/2) generated by the branchlayer determining unit 104. Since two pieces of position information(3/4,1/2) and (3/4,1/4) are equal in the value of the first layer butdifferent in the value of the second layer, the branching takes place atthe second layer. It is also learned that the value of the positioninformation at the second layer is 1/4, correctly shifted from 1/2 byone notch in accordance with the order relationship of FIG. 4A. Thebranch layer determining unit 104 sends, to the differential positioninformation encoding unit 105, information indicating that the branchlayer is the second layer. Based on the determination results from thebranch layer determining unit 104, the differential position informationencoding unit 105 outputs the position information code “10” indicativeof the second layer.

In this way, the position information having the tree structure evenwith a deficiency can be difference encoded. Further, by using thedeficiency code actively, the search data of the same type contained inthe search information having the tree structure which is optionallyselected can be grouped, or partly trimmed before being transmitted orrecorded.

FIG. 10 is a flowchart illustrating the position information decodingmethod in accordance with the first embodiment of the present invention.

The position information encoding method of the first embodiment of thepresent invention comprises a position information rearranging step(step S1), an initial position information encoding step (step S2), apreceding position information storage step (step S3), a branch layerdetermining step (step S6), and a differential position informationencoding step (step S8). The encoding method of the first embodiment ofthe present invention also relates to an encoding process of encodingthe position information. The present invention can be embodied as anencoding process including a position information encoding process.

First, a plurality of pieces of position information to be encoded arearranged in accordance with the order relationship of FIG. 4A (step S1).The rearranged initial position information is encoded through anordinary method (step S2). At the same time, the initial positioninformation is stored as the preceding position information for use inencoding next position information (step S3).

It is then determined whether next position information to be encoded isavailable (step S4). If it is determined that the next positioninformation to be encoded is available, the position information to beencoded is read (step S5). The read position information to be encodedis compared with preceding position information stored to determine thebranch layer (step S6). At this time, it is determined whether adeficiency is contained between the two pieces of position information(step S7). As previously discussed in connection with the encodingdevice, the deficiency determination is performed depending on whetherthe position information follows the order relationship of FIG. 4A.

If no deficiency is present, the position information code correspondingto the branch layer is output (step S8), the encoded positioninformation is stored again as preceding position information (step S3),and the same process is repeated.

If a deficiency is present, a deficiency code is output (step S9), andthen a position information code corresponding to the branch layer isoutput (step S8) Next position information, which could be obtained onthe assumption that no deficiency was contained, is generated from theposition information stored as the preceding position information. Thatdeficiency position information is stored as the preceding positioninformation (step S10). A branch layer is then determined again based onthe preceding position information and already read position informationto be encoded (step S6). If the position information to be encoded isdetermined as having a deficiency, the same position information isencoded again. Similarly, the presence or absence of deficiency isdetermined. If it is determined that a deficiency is contained, a stepof outputting the deficiency code (step S9) and subsequent steps areperformed. If it is determined that no deficiency is contained, theposition information code is output (step S8), and the encoded positioninformation is encoded as preceding position information (step S3).

If it is determined in step S4 that no position information to beencoded is available, an end code is output (step S11), and the encodingprocess ends.

The encoding efficiency of encoding the position information representedin the rational number using the encoding device and the encoding methodin accordance with the first embodiment of the present invention becomesmaximized if no deficiency is contained in the position information, inother words, if the values of the plurality of pieces of positioninformation to be encoded are represented in rational numbers and areconsecutively provided in accordance with the predetermined rationalnumber order, namely, the order relationship of FIG. 4A. It is thuscontemplated that the order relationship of the predetermined rationalnumber of FIG. 4A is used when a plurality of pieces of search data(leaves or nodes) having the same element type information are assignedposition information.

If the number of pieces of search data (leaves or nodes) having the sameelement type information to be assigned position information is M, Mvalues are selected from the front in accordance with the orderrelationship of FIG. 4A, and are rearranged in the order of magnitude.The search data is then assigned the rearranged values as positioninformation. For example, if the number of search data (leaves or nodes)having a plurality of pieces of the same element type information to beassigned position information is 5, the five values from the front inaccordance with the order relationship of FIG. 4A, namely, 1/2, 1/4,3/4, 1/8, and 3/8 are selected. The values are rearranged in the valuemagnitude, namely, to 1/8, 1/4, 3/8, 1/2, and 3/4. The search data isthus assigned the rearranged values as corresponding positioninformation.

When the rational values are individually encoded, a rational numberwith lower resolution (with a smaller denominator value) is generallyencoded with a shorter code. The assignment of the value of the rationalnumber position information following the order relationship of FIG. 4Aprovides, in addition to the advantage that the plurality of pieces ofposition information are difference encoded together in accordance withthe embodiment of the present invention, another advantage that theentire code length of the code related to the position information isminimized when the rational number position information attached to thesearch data (leaves or nodes) are individually encoded.

The assignment of the position information in accordance with the orderrelationship of FIG. 4A is similarly performed in the following process.

From the M pieces of position information for assignment, the minimumresolution (the minimum denominator value) N required to represent thatnumber is determined. In the example of FIG. 4A, N is power of 2, andthe number of pieces of position information represented by theresolution N is N−1 including 1/N through (N−1)/N. The minimum power of2 satisfying M<=N−1 becomes N. If M=N−1, M pieces of positioninformation is assigned values of 1/N through (N−1)/N, and theassignment process ends.

If the condition of M=N−1 does not hold, resolution N′ lower than theresolution N by one is determined, and a difference value M′=M−(N′−1) iscalculated. Here, N′−1 is the number of pieces of position informationrepresented by the resolution N′. The difference value M′ is the numberof pieces of position information, not represented by the resolution N′,out of M pieces of position information for assignment. In other words,the difference value M′ is the number of pieces of position informationhaving a denominator of N. Therefore, M pieces of position informationis the sum of (N′−1) represented by the resolution N′, namely, n/N′(here n=1, 2, . . . , N′−1), and smaller M′ pieces of positioninformation having the denominator N, namely, n/N (here n=1, 3, . . . ,2M′−1). Since N is power of 2, the numerator of the position informationhaving the denominator of N is a value that cannot be reduced, namely,an odd number.

As shown in FIG. 4B, the magnitude relationship of these values is asfollows in the order from small to large: 1/N , 1/N′ (namely, 2/N), 3/N,2/N′ (namely, 4/N), . . . , (M′−1)/N′ (namely, (2M′−2)/N), (2M′−1)/N,M′/N′(namely, 2M′/N), (M′+1)/N′, (M′+2)/N′, . . . , (N′−1)/N′. In otherwords, these values include the 2M′ values starting with 1/N andincreasing in steps of 1/N and reaching M′/N′(namely, 2M′/N), and M−2M′values increasing from M′/N′ in steps of 1/N′ and reaching (N′−1)/N′.The width of increase of 1/N and 1/N′ are referred to as a “step width”.The 2M′ values are determined by successively adding the step width of1/N to 1/N as the initial value, and the remaining M values aredetermined by successively adding the step width of 1/N′ to theresulting value. M pieces of position information from the front inaccordance with the order relationship of FIG. 4 are thus determined.For example, if the number of search data (leaves or nodes) having aplurality of the pieces of the same element type information to beassigned the position information is 5, the resolution N=8, theresolution N′=4, and the difference M′=2 are obtained. With the initialvalue as 1/8, 2M′=4 values 1/8, 1/4, 3/8, and 1/2 are determined, and afifth value 3/4 is determined by adding 1/4 to 1/2.

According to this method, the two step widths of 1/N and 1/N′ and apredetermined position 2M′ for switching between the two step widths areprovided so that the M pieces of position information from the front inaccordance with the order relationship of FIG. 4 are provided in theorder of magnitude. This method eliminates the need for an operation torearrange the obtained values of position information in the order ofmagnitude, and the values following the order relationship of FIG. 4Aare assigned to in a high speed. By setting a value greater than adifference value thus obtained to the value M′ specifying the step widthswitching position, the value of position information for assignment isshifted to a smaller value. In this case, 2M′ does not exceed M.

A position information decoding device of the first embodiment of thepresent invention is described below with reference to FIG. 11.

FIG. 11 is a functional block diagram illustrating the schematicstructure of the position information decoding device in accordance withthe first embodiment of the present invention.

The position information decoding device of the first embodiment of thepresent invention comprises an initial position information decodingunit 1101, a preceding position information storage unit 1102, a branchlayer determining unit 1103, a differential position informationdecoding unit 1104, and a position information rearranging unit 1105. Aspreviously discussed, in accordance with MPEG-7, the element typeinformation and the position information are individually encoded, andare then handled together with the search data. The present inventionrelates to a decoding process of the position information. The decodingprocess of the present invention is not limited to the process ofMPEG-7. The present invention is embodied as a decoding device thatperforms a decoding process including position information decoding tobe discussed here.

The most unique functional structure of the position informationdecoding device of the present embodiment of FIG. 11 lies in theposition information rearranging unit 1105 arranged subsequent to adecoding stage.

The position information rearranging unit 1105 rearranges the rationalnumber position information, decoded by the differential positioninformation decoding unit 1104 as a preceding stage and arranged in theorder relationship of FIG. 4A, in the order of magnitude of the originalvalues. As previously discussed in this specification, in the case ofthe position information corresponding to each search data (or nodes)contained in the search information, the search data (or nodes) istypically handled in the same order as that in the original treestructure. Since the position information is easier to handle in thatorder, the corresponding position information needs to be rearranged inthe original order.

The decoding process to be performed prior to the position informationrearrangement process of the position information rearranging unit 1105is identical to the decoding process of the position informationrepresented in the known integer representation. The operation of theposition information rearranging unit 1105 will be described later indetail below.

First, the initial position information decoding unit 1101 decodesinitial position information, and outputs the decoded initial positioninformation. The decoding process to be performed herein is intended todecode position information that has been encoded in an ordinary method.As the discussion of the encoding process, the discussion of thedecoding process is also skipped.

The operation of the position information decoding device of the presentembodiment in response to the inputting of the position information codestring of FIG. 5 is described below. The position information codestring of FIG. 5 is obtained by the above-referenced positioninformation encoding device of FIG. 1 that encodes the positioninformation of each search data 201-209 contained in the searchinformation of FIG. 2. The position information code string to bedecoded by the decoding device of the present embodiment is not limitedto the code string generated by the encoding device of FIG. 1.

The initial position information (1/2,1/2) decoded by the initialposition information decoding unit 1101 is input to the positioninformation rearranging unit 1105 while being recorded onto thepreceding position information storage unit 1102. The preceding positioninformation storage unit 1102 currently stores the position informationprocessed at a preceding cycle with respect to the position informationcurrently being decoded.

The branch layer determining unit 1103 successively reads the positioninformation codes of the input position information code string one byone, determines a branch layer of the position information code, inother words, determines what layer the value of the position informationis updated at, and transfers the determination results to thedifferential position information decoding unit 1104. The bit length ofposition information code to be read successively by the branch layerdetermining unit 1103 is determined by the number of layers of theposition information. As previously discussed in connection with theencoding device, when the position information contained in theidentification information of search data is decoded, the element typeinformation is generally encoded together with the encoded positioninformation, namely, the position information code string, beforestorage or transfer. The element type information is thus decoded andanalyzed to determine the number of branchable elements. The number oflayers of the position information is thus learned, and the bit lengthof the position information code to be read is learned. If informationindicative of the bit length is separately provided together with theposition information code string, the bit length of the positioninformation code to be read based on that information is learned. Thedetermination process of the bit length, which is performed separatelyfrom the decoding process of the decoding device of FIG. 11, is notshown.

The differential position information decoding unit 1104 reads theposition information stored in the preceding position informationstorage unit 1102, and updates the value of the position informationbased on the determination results from the branch layer determiningunit 1103 in accordance with the order relationship of FIG. 4A. Morespecifically, the differential position information decoding unit 1104increases the value of the position information, stored in the precedingposition information storage unit 1102, at the branch layer by one notchin accordance with the order relationship of FIG. 4A based on thedetermination results of the branch layer determining unit 1103. At alllayers under the branch layer, the value of the position information isset to the initial value 1/2 in the order relationship of FIG. 4A. Thevalues of the position information above the branch layer remainunchanged.

The position information (1/2,1/2) is decoded by the initial positioninformation decoding unit 1101, and then stored in the precedingposition information storage unit 1102. A position information code tobe read next is “10”. The branch layer determining unit 1103 determinesthat the code “10” means that the branching takes place at the secondlayer, namely, the shot layer. Based on the determination results, thedifferential position information decoding unit 1104 updates the valueof the position information at the second layer=shot layer by one notchin accordance with the order relationship of FIG. 4A. Since 1/2 isfollowed by 1/4 as shown in FIG. 4A, position information (1/2,1/4) isobtained from position information (1/2,1/2) with the value of theposition information at the second layer updated.

With position information (1/2,3/4) recorded in the preceding positioninformation storage unit 1102, position information code “01” is readnext. The branch layer determining unit 1103 determines that the code“01” indicates that the branching takes place at the first layer,namely, the scene layer. Based on the determination results, thedifferential position information decoding unit 1104 updates the valueof the position information at the first layer=scene layer by one notchin accordance with the order relationship of FIG. 4A. The value of theposition information at layer under the scene layer, namely, at thesecond layer=shot layer, is set to the initial value 1/2 in the orderrelationship of FIG. 4A. Since 1/2 is followed by 1/4 as shown in FIG.4A, position information (1/4,1/2) is obtained from (1/2,3/4) with thevalues of the position information at the first and second layersupdated.

The position information obtained by the differential positioninformation decoding unit 1104 is output to the position informationrearranging unit 1105 while being transferred to and recorded in thepreceding position information storage unit 1102 for use in the decodingoperation of next position information.

When an end code “11” is read by the branch layer determining unit 1103,the decoding process of the position information ends and the positioninformation rearranging unit 1105 continues to rearrange positioninformation.

Since the rational number position information decoded and output by thedifferential position information decoding unit 1104 is arranged inaccordance with the order relationship of FIG. 4A, the positioninformation rearranging unit 1105 rearranges the position information inthe original order of magnitude. In the example of decoding the positioninformation code string of FIG. 5, position information 303 of FIG. 3subsequent to the rearrangement is converted to position information 302prior to rearrangement. In the rearrangement process, the values of theposition information are rearranged in the order of magnitude from anupper layer to a lower layer. If the values of the position informationat a first layer are the same, the values of the position information ata second layer under the first layer are rearranged in the order ofmagnitude. If the values of the position information at the second layerare the same, the values of the position information under the secondlayer are rearranged in the order of magnitude. Such an operation isrecursively repeated. The operation is identical to that of the encodingdevice that rearranges the position information in accordance with theorder relationship of FIG. 4A. Alternatively, the rearrangement of theposition information can be performed by handling the values of theposition information at all layers in the leaves or nodes togetherrather than comparing the values of the position information on a perlayer basis. For example, the magnitude relationship between theposition information at one leaf or node and the position information atanother leaf or node is defined. In accordance with the magnituderelationship, an existing sort algorithm such as the quicksort isapplied to the position information at the leaf or node to rearrange theposition information. Any rearrangement method is perfectly acceptableas long as the rearrangement method executes a rearrangement similar tothe above method. The present invention is not limited to theabove-referenced rearrangement methods.

As an example of the rearrangement method, the rearrangement process ofthe position information is described below with reference to FIGS. 12through 15. The rearrangement process takes advantage of the fact thatthe values of the rational number position information output from thedifferential position information decoding unit 1104 and the outputorder of the values follow the order relationship of FIG. 4A.

FIG. 12 illustrates an operation example of the rearrangement of theposition information during decoding in accordance with the firstembodiment of the present invention. The rearrangement process isperformed inside the position information rearranging unit 1105.

As shown in FIG. 12, 10 pieces of position information 1201 (the numberof branchable layers is 3) are decoded and output by the differentialposition information decoding unit 1104. The position information 1201is arranged in the order of decode from the top, namely, in accordancewith the order relationship of FIG. 4A.

In the rearrangement process of FIG. 12, the decoded positioninformation is successively assigned serial numbers representing theorder of magnitude (starting with 0). This number is referred to as an“index” (see 1203 of FIG. 12). If each of the position information isassigned the respective index, and the position information isrearranged in accordance with the value of the indices. Therefore, theposition information rearranging unit 1105 includes an index calculator(calculating unit), such as the one shown in FIG. 13. Since the numberof the position information 1201 to be rearranged in FIG. 12 is 10, thevalues of the indices 1203 are 0 through 9. Depending on the number ofpieces of position information, for example, the index 1203 takes 0 to14 for 15 pieces of position information, and the index 1203 takes 0 to29 for 30 pieces of position information. The value of index assigned toeach of position information is determined as described below.

FIG. 13 is a functional block diagram of the position informationdecoding device that performs a process at one branch position in agiven layer to calculate the value of an index assigned to each of theposition information. In other words, FIG. 13 illustrates the internalstructure of the index calculator in the position informationrearranging unit 1105. The process of FIG. 13 is performed by a positioninformation counter (counting unit) 1301, an update width calculator1302, and an index value updating unit 1303. The index calculatorreceives the decoded position information, the count processed at animmediately upper layer, and as index values, a new count, and anupdated index value. The update width calculator 1302 receivesseparately summing order information 1304. By performing that process onall branch positions of all layers, indices corresponding to eachposition information are obtained.

The position information counter 1301 receives the decoded positioninformation and the count at the immediately upper layer, and counts thenumber of pieces of position information having the same value ofposition information at a given layer at a given branch position. FIG.12 illustrates count results 1202. The count results 1202 include thoseof all layers and all branch positions.

For example, at (the branch position of) the first layer, six out of theten pieces of position information take the value 1/2, and four out ofthe ten pieces of position information take the value 1/4. At firstbranch positions at the second layer (six pieces of position informationfrom the top having the value 1/2 at the first layer), four out of thesix pieces of position information take the value 1/2, and two out ofthe six pieces of position information take the value 1/4 at the secondlayer. The “branch position” refers to a set of position informationcorresponding to all elements (leaves or nodes) hanging under a node atan immediately upper layer as a starting point above a target layer in atree structure, or refers to a set of position information having thesame value at layers above the target layer based on the value ofposition information. The number of pieces of position informationcontained in each branch position is provided by the count at the inputimmediately upper layer. At the first layer of FIG. 12, elements hangingunder the root, namely, the position information of all elements, arereferred to “branch position” at the first layer.

The order of occurrence of the values of the position information to becounted is the order of decoding. Therefore, the position informationfollows the order relationship of FIG. 4A at any branch position. Thecount process always determines the count in accordance with the orderrelationship of FIG. 4A. If any value is missing (a lack of value occursin the middle), the count of occurrence of the value is counted as 0. Inother words, in the resulting count, a first count is always the initialvalue 1/2 in FIG. 4A, and a second count is the count of occurrence of1/4 in FIG. 4A. The count results are output to the update widthcalculator 1302 and the index value updating unit 1303 for use in aprocess of a next layer.

Based on the received count from the position information counter 1301,the update width calculator 1302 determines an update width of the indexvalue of each position information in accordance with the positioninformation at the target layer.

The update width of the index value of the position information having acertain value at the target layer at a given branch position isdetermined depending on how many pieces of position information having avalue smaller than the certain value are there at the layer. Forexample, if M1 pieces of position information, M2 pieces of positioninformation, and M3 pieces of position information have respectively thevalues 1/4, 1/2, and 3/4at a target layer at a certain branch position,M1 pieces of position information having the value 1/4 are present priorto the position information having the value 1/2. Therefore, theposition information having the value 1/2need to be provided with theindex which is larger by M1 than that of the position information havingthe value 1/4. Accordingly, the update width of the index values of theposition information having the value 1/2 is M1. For the same reason,the update width of the position information having the value 3/4 isM1+M2. The M1 pieces, M2 pieces, and M3 pieces of position informationcorrespond to the counts obtained by the position information counter1301. More specifically, by summing the counts provided by the positioninformation counter 1301 in the order of magnitude, the update widthcorresponding to each value of the position information is thusobtained.

To perform the above summing process, the counts provided by theposition information counter 1301 need to be read in the order ofmagnitude. On the other hand, as previously discussed, the countsprovided by the position information counter 1301 indicate the counts ofoccurrence of each of position information in accordance with the orderrelationship of FIG. 4A. Without comparing the values of the positioninformation one piece with another, the magnitude relationship of thevalues are thus learned from the order of acquisition of the counts.Without direct comparison of the values, the amount of computation isreduced. The summing order information 1304 serves this purpose.

The summing order information 1304 is described below with reference toFIGS. 14 and 15. Each of a table 1401 of FIG. 14 and a table 1501 ofFIG. 15 is an example of the summing order information 1304. Forexample, if the number of the values of the position information countedis 3 as a result of counting to 3/4 in the order relationship of FIG.4A, the order of magnitude from small to large is a second value (1/4),a first value (1/2), and a third value (3/4), as represented by thetable 1401 in FIG. 14, and the counts are summed in that order. If thecounts of the position information is 7 as a result of counting to 7/8,the order of magnitude is listed in the table 1501 in FIG. 15, and thecounts are summed in that order. In other words, depending on whatposition information in the order relationship of FIG. 4A is counted(decoded) to, the order of magnitude of the counting order (decodingorder) is uniquely determined. Information of the order of magnitude ofthe counts is referred to as “summing order information”.

If the counts of the values of the position information is 2 as a resultof counting to 1/4 in the order relationship of FIG. 4A, the summingorder information for the values of two pieces of position informationmay be prepared and used. It is also possible to prepare the summingorder information of each value of the position information to thatvalue in the order relationship of FIG. 4A. However, since a largecapacity of memory is required to prepare the summing order informationof all values of the position information, such an arrangement is notalways appropriate. With N being power of 2, only a plurality of piecesof summing order information of the values of position information up to(N−1)/N in the order relationship of FIG. 4A are prepared. The summingorder information of the values of the position information other thanup to (N−1)/N can determine the summing order by referencing any of theprepared plurality of pieces of summing order information up to (N−1)/N.

The summing order information corresponding to (N−1)/N equal to orlarger than the value of the position information decoded last in theorder relationship of FIG. 4A can be used to determine the summingorder. To limit the summing operation to a minimum, a minimum (N−1)/Nequal to or larger than that value is selected and the summing orderinformation corresponding to the minimum (N−1)/N is used. Then, N isequal to the denominator of the value decoded last. For example, if thevalue of the position information decoded at a given branch position aretwo pieces of 1/2 and 1/4, the denominator of the value 1/4 decoded lastis 4, and decoding order information to 3/4, namely, the table 1401 ofFIG. 14 is used. If the value of the position information is four piecesof 1/2, 1/4, 3/4, and 1/8, the denominator of the value 1/8is 8, anddecoding order information to 7/8, namely, the table 1501 of FIG. 15 isused. The counts provided by the position information counter 1301 aresummed in the order of the summing order information 1304, and theupdate width of the index value corresponding to each of the values ofthe position information is thus determined. The count for empty decodedvalue is treated as 0 in the summing operation. The update width is thenoutput to the index value updating unit 1303.

The index value updating unit 1303 updates the value of the indexassigned to each position information based on the update width providedby the update width calculator 1302, the count results provided by theposition information counter 1301, and the count at the immediatelyupper layer.

The count obtained first in the position information counter 1301 meansthe number of pieces of position information having the value 1/2 at atarget layer. As for the position information of the first count fromthe front from among the position information at the branch position,the value of index is updated with the update width corresponding to thevalue 1/2 obtained by the update width calculator 1302. The front of thebranch position is determined from the input count at an immediatelyupper layer. Similarly, the second and subsequent counts are alsoprocessed.

The process of the update width calculator 1302 and the index valueupdating unit 1303 is described below. The update width calculator 1302and the index value updating unit 1303 process the position informationat the branch position at the first and second layers based on the countresult 1202, indices, and the update width 1203 of FIG. 12.

First, the initial value of the index of each of position information isset to 0.

The position information decoded at the first layer includes two valuesof 1/2 and 1/4, and the table 1401 of FIG. 14 is used as the summingorder information 1304. The first position information value 1/4 is setto an update width of 0 of an index value in the summing orderinformation of the table 1401 of FIG. 14. The update width calculator1302 adds a count 4 corresponding to the value 1/4 to the update width0, thereby determining an update width of the index value correspondingto the next value 1/2 of the table 1401. In the count result 1202 andthe index (and update width) 1203 of FIG. 12, no next value 3/4 ispresent in the first layer. If a next value 3/4 is available, the updatewidth calculator 1302 adds a count 6 corresponding to the value 1/2 tothe update width 4, thereby determining an update width 10 correspondingto the next value 3/4 in accordance with the table 1401.

Based on the first count 6, the index value updating unit 1303 adds theupdate width 4 corresponding to the value 1/2 to the index value 0(initial value) assigned to six pieces of position information from thefront, thereby determining the updated index value 4. The index valueupdating unit 1303 adds an update width 0 corresponding to the value 1/4to the index value 0 of following 4 pieces of position informationcorresponding to the second count, thereby determining the updated indexvalue 0.

Similarly, the values of position information decoded at a first branchposition (six pieces of position information from the top) at the secondlayer include two pieces of 1/2 and 1/4, and the table 1401 of FIG. 14is used as the summing order information 1304. The first positioninformation value 1/4 in the summing order information of the table 1401is set to 0 update width of the index value. The update width calculator1302 adds the count 2 corresponding to the value 1/4 to the update width0, thereby determining an update width 2 of the index valuecorresponding to a next value 1/2 in the table 1401.

Based on the first count 4, the index value updating unit 1303 adds anupdate width of 2 corresponding to a value 1/2 to the index value of 4assigned to 4 pieces of position information from the front, therebydetermining an updated index value 6. The index value updating unit 1303adds an update width of 0 corresponding to a value 1/4 to the indexvalue of 4 of 2 pieces of following position information correspondingto the second count, thereby determining an updated index value of 4.

In the second branch position at the second layer (lower 4 pieces ofposition information), the table 1401 of FIG. 14 is used as the summingorder information 1304. The update width calculator 1302 determines anupdate width of 0 corresponding to the position information value of1/4, and an update width of 1 corresponding to the value 1/2.

In accordance with the count provided by the position informationcounter 1301, the index value updating unit 1303 adds an update width of1 to 3 pieces of position information from the front of the branchposition, thereby determining an index value of 1, and adds an updatewidth value of 0 to the remaining position information, thereby updatingthe index value to 0. The front of the second branch position at thesecond layer is determined by the count at the input immediately upperlayer.

The two counts, 6 and 4, at the first layer as the count results 1202represent the number of pieces of position information at the two branchpositions at the second layer. For this reason, the front of the secondbranch position at the second layer is calculated by adding 1 to thenumber of pieces of position information at the first branch position,namely, 6. The front of the second branch position is thus 7. The frontof the branch position is thus identified, and the index of each ofposition information contained in the branch position is updated.Instead of the count, front position converted information of eachbranch position is stored and received from an upper layer.

This process is similarly performed at each branch position of eachlayer. When the process is successively performed from an upper layer,index values at each layer subsequent to updating and the values ofupdated widths (in parentheses) determined at each branch position areshown at 1203 of FIG. 12. Since each of the values of the positioninformation occurs one time at the third layer as the lowest layer, theindex values having an interval of 1 from one to another are finallyobtained. The indices thus obtained represent an order relationship ofthe position information. By reading the position information inaccordance with the index, the position information is rearranged. Therearranged position information is output from the position informationrearranging unit 1105 of FIG. 11.

The index value is successively updated by adding the value of theupdate width in each of the above process. Alternatively, the value ofupdate width at each layer is separately determined, and the values ofupdate widths of each of the layers are then summed.

In the above process described with reference to FIG. 13, the countprocess of the position information, the summing process, and the updateprocess of the index values are performed at each branch position.Alternatively, the count process of the position information may beperformed on all branch positions at all layers first, and thedetermined counts may be stored as the count results 1202 of FIG. 12 foruse in later process. In this case, a memory for storing the countresults is additionally required. Since the count results of anotherlayer can be used at any time, this arrangement eliminates the need forperforming the process in the order of layers, and the order ofprocessing the layers and the order of the branch positions can beflexibly modified. Further, the count process can be performed while theposition information is decoded, rather than after all positioninformation is decoded.

In the above-referenced rearrangement process of the positioninformation (the calculation method of the index values), by using thesumming order information 1304 reflecting that the value of the positioninformation to be decoded follows the order relationship of FIG. 4A, therearrangement process is performed without comparing the decoded values,and the calculation process is thus lightened. In accordance with theabove method, the process of the update width calculator 1302 is thesumming process of the number of occurrences of output positioninformation. If any missing or deficient value of position informationoccurs, the number of occurrences of the position information is countedas 0, and the same process is applicable to all position information.For this reason, this arrangement requires no particular branch process.Even if a deficiency of position information takes place as describedbelow, the rearrangement process is performed at a high speed.

The rearrangement method in the decoding process has been discussed. Theabove-referenced rearrangement method is equally applicable to theencoding process. In such a case, the summing order information 1304 isnot converted from the “order of FIG. 4A” to the “order of magnitude” asshown in FIGS. 14 and 15, but converted from the “order of magnitude” tothe “order of FIG. 4A” corresponding to the encoding process. Theposition information is represented in rational numbers of “a naturalnumber over power of 2 (the denominator being the power of 2 and thenumerator being the natural number)” in the present embodiment. Therearrangement process is also applicable to position informationrepresented in another rational number, and any position information, ifnot in rational number representation, in need of rearrangement.

The decoding operation of the position information code string of FIG. 9is described below as an example of decoding of the position informationhaving a tree structure with a deficiency.

When position information (1/2,1/2) is stored in the preceding positioninformation storage unit 1102, a position information code to be read bythe branch layer determining unit 1103 is a deficiency code “00”representing a deficiency. In this case, the branch layer determiningunit 1103 notifies the differential position information decoding unit1104 that the position information coming next is at a deficientposition, and then read a next position information code “10”. The nextposition information is a code representing a branch of the secondlayer, and the branch layer determining unit 1103 notifies thedifferential position information decoding unit 1104 of thedetermination results thereof.

The differential position information decoding unit 1104 learns that thenext update position is at the deficient position, and that the branchlayer to be updated is the second layer. From the position information(1/2,1/2) stored in the preceding position information storage unit1102, the differential position information decoding unit 1104 updatesthe value of the second layer by one notch in accordance with the orderrelationship of FIG. 4A, namely, from 1/2 to 1/4 thereby resulting inupdated position information (1/2,1/4). Since the differential positioninformation decoding unit 1104 is notified that the position informationis at the deficient position, the differential position informationdecoding unit 1104 does not output the updated position information tothe position information rearranging unit 1105. The differentialposition information decoding unit 1104 outputs the updated positioninformation (1/2,1/4) to only the preceding position information storageunit 1102 for storage.

Since the position information code to be read next is “10”, the branchlayer determining unit 1103 determines that the next branch layer is thesecond layer, and notifies the differential position informationdecoding unit 1104 of the determination results thereof.

The differential position information decoding unit 1104 learns that thebranch layer is the second layer. The differential position informationdecoding unit 1104 updates the value of the second layer of the positioninformation (1/2,1/4) stored in the preceding position informationstorage unit 1102 from 1/4 to 3/4 in accordance with the orderrelationship of FIG. 4A, thereby resulting in (1/2,3/4) . Since thisposition information is not at a deficient position, the positioninformation (1/2,3/4) is output to the position information rearrangingunit 1105. The next position information is thus correctly decoded.

A deficiency code “00” representing a deficiency is the positioninformation code that is read by the branch layer determining unit 1103at the moment the position information (1/4,3/4) is recorded onto thepreceding position information storage unit 1102. The branch layerdetermining unit 1103 notifies the differential position informationdecoding unit 1104 that position information coming next is at adeficient position, and reads the next position information code “01”.Since the next position information is a code representing a branch atthe first layer, the branch layer determining unit 1103 notifies thedifferential position information decoding unit 1104 of thedetermination results thereof.

The differential position information decoding unit 1104 learns that thenext update position is at a deficient position, and that the branchlayer to be updated is the first layer. From the position information(1/4,3/4) stored in the preceding position information storage unit1102, the differential position information decoding unit 1104 updatesthe value at the first layer by one notch in accordance with the orderrelationship of FIG. 4A, namely, from 1/4 to 3/4, and sets the value atthe second layer to the initial value 1/2 in accordance with the orderrelationship of FIG. 4A. The updated position information (3/4,1/2) thusresults. Since the differential position information decoding unit 1104is notified that the position information (3/4,1/2) is at the deficientposition, the differential position information decoding unit 1104outputs the value (3/4,1/2) not to the position information rearrangingunit 1105 but to only the preceding position information storage unit1102 for storage.

Since the position information code to be read next is “10”, the branchlayer determining unit 1103 determines that the next branch layer is thesecond layer, and notifies the differential position informationdecoding unit 1104 of the determination results thereof.

Upon learning that the branch layer is the second layer, thedifferential position information decoding unit 1104 updates the valueof the second layer of the position information (3/4,1/2) stored in thepreceding position information storage unit 1102, from 1/2 to 1/4, inaccordance with the order relationship of FIG. 4A, thereby resulting in(3/4,1/4). The position information (3/4,1/4), which is not at adeficient position, is output to the position information rearrangingunit 1105. The next position information is thus correctly decoded.

When the position information of the search data (or nodes) contained inthe search information is handled, decoded position informationcorresponds to search data (or nodes). The search data (or nodes) areoften handled in the order of occurrences in the original treestructure, namely, in the order of magnitude for transmission orstorage. In accordance with the present invention, the rearrangementprocess results in the position information in the original order ofmagnitude, thereby assuring correspondence with the search data (ornodes). Each of the search data (or nodes) is thus identified.

If the search data (or nodes) can be selected between at the order ofoccurrence in the original tree structure and at the same order of FIG.4A as the position information, a flag indicating whether the searchdata (or nodes) are rearranged or not is separately arranged, and istransmitted or stored together with the position information codestring. In accordance with the value of the flag, the positioninformation rearranging unit 1105 can select whether to rearrange theposition information.

FIG. 16 is a flowchart illustrating the decoding method of the positioninformation in accordance with the first embodiment of the presentinvention.

The position information decoding method of the first embodiment of thepresent invention comprises an initial position information decodingstep (step S21), a preceding position information storage step (stepS22), a branch layer determination/differential position informationdecoding step (step S26), and a position information rearranging step(step S29). The decoding method of the first embodiment of the presentinvention also relates to the decoding of the position information. Theprocess of the present invention includes the decoding method ofdecoding the position information discussed herein.

First, initial position information is decoded using ordinary method(step S21). The decoded initial position information is stored aspreceding position information (step S22).

A position information code is read (step S23). It is then determinedwhether the read position information code is an end code (step S24). Ifit is determined that the read position information is not an end code,it is then determined whether the read position information is adeficiency code (step S25).

If it is determined that the read position information is not adeficiency code, a branch layer is then determined based on the positioninformation code. The position information is updated based on thedetermination results, namely, next position information is determined(step S26). As previously discussed in connection with the decodingdevice, the process of determining the next position information isdesigned to increase the value of the position information at the branchlayer by one notch in accordance with the order relationship of FIG. 4A.At a layer below the branch layer, the value of the position informationis set to the initial value 1/2 in the order relationship of FIG. 4A,and at a layer above the branch layer, the value of the positioninformation remains unchanged. The resulting position information isoutput (step S27) while being stored as the preceding positioninformation (step S22) This process is repeated.

If it is determined that the read position information is a deficiencycode, the next position information code is read (step S28). The branchlayer is determined from the read position information code, and nextposition information is determined the same as above (step S26). Sincethe position information determined herein is at a deficient position,the position information is not output but stored as mere next precedingposition information (step S22). The process subsequent to step S22 isthen repeated.

If it is determined that the read position information code is an endcode (step S24), position information decoded last and output isrearranged in the order of magnitude (step S29), and the decodingprocess ends.

In the encoding/decoding device and the methods thereof of theembodiment of the present invention, “a natural number over power of 2”is used as the rational number position information. However, therational number position information is not limited to thisrepresentation. For example, a “natural number over power of 3 (thedenominator being power of 3 and the numerator being the naturalnumber)” can be equally used. In accordance with the embodiment of thepresent invention, the “natural number over power of 2” does not include0, but 0 also can be used as a candidate value of the positioninformation. In such a case, 0 precedes 1/2 in the order relationship ofFIG. 4A, and the initial value is 0. The present invention is alsoapplicable to position information other than that in rational numberrepresentation, for example, applicable to position information that isnot ordered as is but can be ordered by performing the rearrangementprocess. If one value to be updated from another value cannot beuniquely identified from the order relationship of values in positioninformation in accordance with the present invention, a predeterminedorder relationship is determined, and the position information isrearranged in accordance with the determined order relationship. As theposition information represented in the integer number, a plurality ofpieces of position information is encoded/decoded using the differentialencoding technique.

Second Embodiment

A position information encoding device of a second embodiment of thepresent invention is described below with reference to FIGS. 17 through21.

FIG. 17 is a functional block diagram illustrating the schematicstructure of a position information encoding device in accordance withthe second embodiment of the present invention.

The position information encoding device of the second embodiment of thepresent invention comprises an initial position information encodingunit 1702, a preceding position information storage unit 1703, a stepwidth determining unit 1701, a step width encoding unit 1706, a branchlayer determining unit 1704, and a differential position informationencoding unit 1705. From among these elements, the initial positioninformation encoding unit 1702, the preceding position informationstorage unit 1703, and the differential position information encodingunit 1705 are respectively identical to the initial position informationencoding unit 102, the preceding position information storage unit 103,and the differential position information encoding unit 105 in thefunctional blocks forming the position information encoding device ofthe first embodiment of the present invention described with referenceto FIG. 1.

In the above-described first embodiment, a unique order relationshiprelating to the value of rational numbers possibly taken by the positioninformation is defined beforehand to encode a plurality of pieces ofposition information represented in rational numbers of searchinformation having a tree structure as shown in FIG. 2. The plurality ofpieces of position information to be encoded are then rearranged inaccordance with the order relationship. Through the rearrangementprocess, a value of a next piece of position information becomes uniquewith respect to a value of a current piece of position information. Eventhe position information in the rational number representation isdifference encoded as the position information in the integer numberrepresentation. To this end, the position information encoding device ofthe first embodiment of FIG. 1 comprises the position informationrearranging unit 101. To convert the rearranged position informationback to the original order of magnitude, the position informationdecoding device of the first embodiment of FIG. 11 comprises theposition information rearranging unit 1105.

In contrast, in accordance with the second embodiment, the orderrelationship of the position information remains unchanged from theorder of magnitude, but instead, a step width in the increase of thevalue of the rational numbers is determined. Differentialencoding/decoding is thus performed by encoding/decoding the step widthtogether with the position information code. In this way, thedifferential encoding/decoding of the rational number positioninformation becomes possible without the need for the rearrangementprocess of the first embodiment. As will be discussed below in detail,in accordance with the present embodiment, the a fixed step width isdetermined and imparted to each layer, and when branching takes place ata given layer, the step width serves as an initial value of positioninformation for a layer below the branch layer. The encoding/decodingprocess is thus simplified, and reduction in the encoding efficiency isthus controlled. To this end, the position information encoding deviceof the second embodiment of FIG. 17 comprises, instead of the positioninformation rearranging unit 101 of FIG. 1, the step width determiningunit 1701 and the step width encoding unit 1706. The positioninformation decoding device of the second embodiment of FIG. 23 to bedescribed below comprises, instead of the position informationrearranging unit 1105 of FIG. 11, the step width decoding unit 2305.

The position information encoding device, the encoding method, thedecoding device, and the decoding method in accordance with the secondembodiment of the present invention are described below. The followingdescription is based on the previous description of the positioninformation encoding device, the encoding method, the decoding device,and the decoding method in accordance with the first embodiment of thepresent invention, and the description of elements shared by the twoembodiments is omitted as necessary. The previous detailed descriptionof the first embodiment including limitations of the first embodiment isnot repeated, and unless otherwise noted, the limitation of the firstembodiment is applicable to the second embodiment as is.

FIG. 18 illustrates an example of position information (positioninformation contained in the identification information corresponding toeach data of the search information of FIG. 2) to be encoded by and aposition information code string encoded by one structure example of theposition information encoding device in accordance with the secondembodiment of the present invention. With reference to FIG. 18, theoperation of the position information encoding device of the secondembodiment of the present invention of FIG. 17 is described below.

Using an ordinary method rather than differential encoding, the initialposition information encoding unit 1702 encodes initial positioninformation out of a plurality of pieces of position information to beencoded. As shown in FIG. 18, the initial position information (1/4,1/4)is encoded by 10 bits=5×2 bits with 5 bits per variable. The encodingmethod of the present invention of encoding the initial positioninformation is omitted as in connection with the first embodiment.

The preceding position information storage unit 1703 records positioninformation processed in a preceding cycle, and outputs the recordedposition information when next position information is encoded. First,the encoded initial position information (1/4,1/4) is recorded andstored.

The step width determining unit 1701 determines a fixed “step width”corresponding to an incremental width from one value to another value inconnection with the values of position information arranged in the orderof magnitude, and outputs the step width to the step width encoding unit1706 and the branch layer determining unit 1704.

With one step width as being an initial value, the value of the stepwidth is incrementally added. The value of position informationrepresentable by the step width is thus determined. The step width at agiven layer is set so that all values of position information belongingto that layer are represented. To efficiently encode positioninformation with excess encoding precluded, the step width is preferablylarge. In accordance with the present embodiment, the step width of “1over power of 2” (the denominator being power of 2 and the numeratorbeing 1) is used instead of a rational number of a “natural number overpower of 2 (the denominator being power of 2 and the numerator being thenatural number)”. The rational number is not limited to thisrepresentation, and the step width is also not limited to thisrepresentation.

From among the position information of FIG. 18 to be encoded, the valuesof the position information present in the first layer are 1/4, 1/2, and3/4. With the initial value being 1/4 and the step width being 1/4, thevalue is updated, and the updated values can contain these values. Thevalues of the position information present in the second layer are also1/4, 1/2, and 3/4, and the step width at the second layer is also set to1/4. If the values of present position information are 1/4, 1/2, and5/8, the initial value=step width=1/4, and the value of 5/8 cannot beexpressed. In this case, with the initial value=step width=1/8, thevalues can contain 1/4, 1/2, and 5/8.

As for the above-referenced step width represented by the “1 over powerof 2”, the values of position information belonging to the same layerare arranged in the order relationship of FIG. 4A and the value at therearmost position is set to be the resolution=the value of thedenominator. The step width is thus determined. The step width is 1 over<the value of the denominator of the value at the rearmost position>. Ifthe values of position information belonging to the same layer arearranged in accordance with the order relationship of FIG. 4A, theresolution of the value at the rearmost position becomes highest. It isthus guaranteed that the other values having resolution lower than (orequal to) the resolution at the rearmost position are represented.

In another technique, which is not used in this embodiment, all valuesof position information belonging to a given layer are arranged in theorder of magnitude, a difference between two adjacent values iscalculated, and the greatest common factor of the difference values andthe minimum value of position information is determined. In this method,an even more efficient step width is set.

For example, if only 3/16, 3/8, and 3/4 are used as the values ofposition information, a difference value between 3/16 and 3/8 is 3/16, adifference value between 3/8 and 3/4 is 3/8, and the minimum value ofposition information 3/16 result in the greatest common factor of 3/16.This value is thus set as the step width of the values of positioninformation and the initial value. The three values 3/16, 3/8, and 3/4are thus efficiently represented by 3/16.

The step width encoding unit 1706 encodes and outputs the step widthcorresponding to each layer determined by the step width determiningunit 1701. The encoding process is performed on each of the step widthsof the layers. As in the previously discussed encoding process of theinitial position information, an ordinary method is used. As shown inFIG. 18, each of the step width of 1/4 at the first layer and the stepwidth of 1/4 at the second layer is encoded using 5 bits. In the presentinvention, the encoding method of the step width of the positioninformation is not described as the encoding method of the initialposition information.

In accordance with the present embodiment, the encoding of the stepwidth is performed subsequent to the encoding of the initial positioninformation. Alternatively, the encoding of the step width can beperformed prior to the encoding of the initial position information. Aswill be discussed later, the value of the step width defined herein isalso used as an initial value of position information imparted toposition information at layer below a branch layer when the values ofthe position information at the branch layer are differenceencoded/decoded.

The process performed by the branch layer determining unit 1704 isbasically identical to the encoding process performed to the positioninformation represented in the conventional integer number. Thedifference is that the step width fixed to “1” is used in the integernumber position information while the step width determined by the stepwidth determining unit 1701 is used, and that the initial value in theinteger number position information is 0 while the step width,determined by the step width determining unit 1701 and identical to theinitial value of the position information, is used as the initial value.As discussed in detail in connection with the position informationencoding device of the first embodiment, the value of the step width isused to determine deficiency in the encoding device of FIG. 17.

The branch layer determining unit 1704 compares input positioninformation to be encoded with position information stored in thepreceding position information storage unit 1703, determines a branchlayer based on the comparison results, and outputs the determinationresults to the differential position information encoding unit 1705. Atthis point, based on the value of the step width output from the stepwidth determining unit 1701, the branch layer determining unit 1704determines deficiency as previously discussed in connection with thefirst embodiment, and outputs the determination results.

In response to the determination results (branch layer and the presenceor absence of deficiency) of the branch layer determining unit 1704, thedifferential position information encoding unit 1705 selects and outputsa position information code.

When the second position information (1/4,1/2) is encoded as shown inFIG. 18, the preceding position information storage unit 1703 stores theposition information (1/4,1/4) encoded in a preceding cycle. If thesepieces of position information are compared with each other, the valuesof the first layer, namely, the scene layer are identical to each other,and the value of the position information at the second layer, namely,the shot layer is increased. Since the value of position information atthe second layer is increased from 1/4 to 1/2 by a step width of 1/4 atthe second layer, the tree structure branches without deficiency. Thedetermination results are output to the differential positioninformation encoding unit 1705, and the differential positioninformation encoding unit 1705 outputs a position information code “10”corresponding to the second layer. The description of the firstembodiment concerning the type of the position information code and thebit length of the position information code is also applicable here.

When fourth position information (1/2,1/4) is encoded as shown in FIG.18, the preceding position information storage unit 1703 stores positioninformation (1/4,3/4) encoded in a preceding cycle. When the two piecesof position information are compared with each other, the value ofposition information is increased at the first layer, namely, the scenelayer. The value of position information at the first layer is increasedfrom 1/4 to 1/2 by a step width of 1/4 at the first layer, and the valueat the second layer becomes an initial value ¼equal to the step width ofthe second layer. This means that the tree structure branches withoutdeficiency. The determination results are output to the differentialposition information encoding unit 1705, and the differential positioninformation encoding unit 1705 outputs a position information code “01”corresponding to the first layer.

If the branch layer determining unit 1704 determines that deficiency ispresent, the position information is encoded using the deficiency codeas previously discussed in connection with the first embodiment withreference to FIG. 9. FIG. 19 illustrates an example of searchinformation having a tree structure that is encoded using the deficiencycode. As shown in FIG. 19, a moving image content 1910 is composed oftwo scenes. A first scene (scene #1/4) is composed of three shots, and asecond scene (scene #1/2) is composed of four shots. The shots at scene#1/4 are assigned 1/4,1/2, and 3/4 as the values of positioninformation. The four shots at scene #1/2 are assigned 1/8,1/4,3/8, and1/2 as position information. In this case, with the initial value=stepwidth=1/8 set, all values are contained in update values. The step widthis thus 1/8.

FIG. 20 illustrates position information extracted from identificationinformation corresponding to data 1901-1907 of search information ofFIG. 19 and a position information code string into which the positioninformation is encoded. In this example, the position information of theshots forming scene #1/4 includes 1/4, 1/2, and 3/4, and a step width of1/4 is considered appropriate if determined from these values only.However, since the step width of 1/8 is set as a whole, originally emptypositions (1/4,3/8) and (1/4,5/8) appear as deficient positions, and areencoded.

To reduce such a redundancy, as shown in FIG. 21, the step width isdetermined and encoded each time the tree branches. The step widthencoded when the tree branches is imparted to a layer present below thebranch layer. When the tree branches at the first layer as shown in FIG.21, the step width is encoded and imparted to a layer below the firstlayer, namely, the second layer. As the number of layers increases, thenumber of step widths to be imparted at branching also increases. Ifthree layers are present and the tree branches at the first layer, twostep widths corresponding to the second layer and the third layer areencoded and imparted.

FIG. 22 is a flowchart illustrating a position information encodingmethod in accordance with the second embodiment of the presentinvention, in particular, the position information encoding methodcorresponding to the operation of the encoding device that has beendiscussed in connection with an example of the position information codestring of FIGS. 18 and 20.

The position information encoding method of the second embodiment of thepresent invention of FIG. 22 is modified from the position informationencoding method of the first embodiment of FIG. 10. More specifically,in the position information encoding method of the second embodiment ofthe present invention of FIG. 22, the position information rearrangingstep (step S1) is eliminated, a step width encoding step (step S32) isadded, and the deficiency determination step (step S7) is modified to adeficiency determination step (step S37) based on the obtained stepwidth. The remaining process of the position information encoding methodof the second embodiment remains unchanged from the process of theposition information encoding method of the first embodiment. Steps S2,S3, S4, S5, S6, S8, S9, S10, and S11 of FIG. 10 respectively correspondto steps S31, S33, S34, S35, S36, S38, S39, S40, and S41 of FIG. 22.

The position information decoding device of the second embodiment of thepresent invention is described below with reference to FIG. 23.

FIG. 23 is a functional block diagram illustrating the schematicstructure of the position information decoding device of the secondembodiment of the present invention.

The position information decoding device of the second embodiment of thepresent invention comprises an initial position information decodingunit 2301, a preceding position information storage unit 2302, a stepwidth decoding unit 2305, a branch layer determining unit 2303, and adifferential position information decoding unit 2304. The initialposition information decoding unit 2301, the preceding positioninformation storage unit 2302, and the branch layer determining unit2303 are identical to the initial position information decoding unit1101, the preceding position information storage unit 1102, and thebranch layer determining unit 1103 in the functional blocks forming theposition information decoding device of the first embodiment of thepresent invention discussed with reference to FIG. 11.

The operation of the position information decoding device of the presentembodiment, except the step width decoding unit 2305 and thedifferential position information decoding unit 2304, is basicallyidentical to the decoding process of the conventional integer numberposition information. The operation of the position information decodingdevice of the present embodiment with the position information codestring of FIG. 18 input thereto is described below.

The initial position information decoding unit 2301 decodes initialposition information and outputs the resulting position information. Asin the first embodiment, the position information encoded using anordinary method is decoded, and the operation thereof is notparticularly discussed.

The initial position information (1/4,1/4) from front 10 bits (5bits×the number of layers of 2), out of the position information codestring of FIG. 18, is decoded, and then recorded and stored in thepreceding position information storage unit 2302.

The step width decoding unit 2305 decodes and determines the value ofthe step width corresponding to each layer. As shown in FIG. 18, a codeof 10 bits (5 bits×the number of layers, namely, 2) of the step widthsubsequent to the code of the initial position information is read, andthe step width of 1/4 at the first layer and the step width of 1/4 atthe second layer are decoded. The decoded value of the step width ateach layer is output to the differential position information decodingunit 2304 for use in decoding the position information.

The step width is encoded/decoded in an ordinary method as the initialposition information. The operation of the encoding/decoding is notparticularly discussed herein. Here, 5 bits of each code of the initialposition information and 5 bits of each code of step width aredetermined depending on the encoding method.

The branch layer determining unit 2303 successively reads the positioninformation code, and notifies the differential position informationdecoding unit 2304 of a branch layer indicated by the positioninformation. In the same manner described with reference to the positioninformation decoding device of the first embodiment, the deficiency codecan be read to process the deficient position.

After the step width decoding unit 2305 decodes the step width of theposition information code string of FIG. 18, the branch layerdetermining unit 2303 reads a position information code “10”. Theposition information code “10” indicates that the tree branches at thesecond layer, namely, the shot layer. The differential positioninformation decoding unit 2304 is notified of the determination results.The description of the first embodiment is applicable as is to the typeof the position information code and the bit length of the positioninformation code.

The differential position information decoding unit 2304 decodes theposition information based on the position information at a precedingcycle stored in the preceding position information storage unit 2302 andthe determination results obtained from the branch layer determiningunit 2303. The step width obtained as decoded by the step width decodingunit 2305 serves as the update width of the value of the positioninformation represented in a rational number, and an initial value ofposition information provided to a layer below an upper branch layerwhen the tree branches at the upper layer.

When the code “10” is determined as being branched at the second layer,namely, the shot layer, the preceding position information storage unit2302 stores position information (1/4,1/4) decoded by the initialposition information decoding unit 2301. The differential positioninformation decoding unit 2304 adds, to the value of the second layer asthe branch layer of the stored position information, the step width of1/4 of the second layer provided by the step width decoding unit 2305.The position information (1/4,1/2) is decoded, and output to thepreceding position information storage unit 2302 for storage.

The branch layer determining unit 2303 reads the position informationcode “01” when the position information (1/4,3/4) is decoded and storedin the preceding position information storage unit 2302. The positioninformation code “01” indicates that the branching takes place at thefirst layer, namely, the scene layer, and the determination results areoutput to the differential position information decoding unit 2304.

Based on the determination result from the branch layer determining unit2303, the differential position information decoding unit 2304 increasesthe position information (1/4,3/4), at the first layer, namely, at thebranch layer, stored in the preceding position information storage unit2302, by a step width of 1/4 at the first layer obtained in the stepwidth decoding unit 2305, and imparts a step width of 1/4 at the secondlayer to the second layer below the branch layer. As a result, positioninformation (1/2,1/4) is decoded. The decoded position information(1/2,1/4) is output while being input into the preceding positioninformation storage unit 2302 for storage.

The above process is repeated until the branch layer determining unit2303 reads an end code “11”, and when the end code “11” is read, thedecoding process ends.

The decoding process with deficiency taking place is described belowwith reference to FIG. 20. As in the first embodiment, a plurality ofpieces of position information containing a deficiency are decoded usinga deficiency code in the present embodiment.

The process up to the decoding of the step width is identical to thedecoding process discussed above with reference to FIG. 18. The stepwidth decoding unit 2305 decodes a step width of 1/4 at the first layerand a step width of 1/8 at the second layer in the position informationcode string of FIG. 20.

After the step width decoding unit 2305 decodes the step width in theposition information code string of FIG. 20, the branch layerdetermining unit 2303 reads a position information code “00”. Theposition information code “00” is a deficiency code indicative of adeficient position. To this end, the differential position informationdecoding unit 2304 is notified of the deficient position while thebranch layer determining unit 2303 reads a next position informationcode “10”. The position information code “10” indicates that the treebranches at the second layer, namely, the shot layer. The differentialposition information decoding unit 2304 is notified of the determinationresults.

The differential position information decoding unit 2304 decodes nextposition information based on the immediately preceding positioninformation stored in the preceding position information storage unit2302 and the determination results obtained from the branch layerdetermining unit 2303. The determination results indicate that thebranch layer is the second layer and that the corresponding position isa deficient position.

The preceding position information storage unit 2302 stores positioninformation (1/4,1/4). A step width of 1/8 at the second layer obtainedby the step width decoding unit 2305 is added to the value of the secondlayer, namely, the branch layer in the stored position information. As aresult, position information (1/4,3/8) is decoded. However, it isnotified that the position represented by the position information(1/4,3/8) is a deficient position. Therefore, the position informationis not output outward as decoded position information, and recorded inonly the preceding position information storage unit 2302 for storage.

The branch layer determining unit 2303 reads a position information code“10”. The position information code “10” indicates that the secondlayer, namely, the shot layer is a branch layer. The differentialposition information decoding unit 2304 is notified of the determinationresults.

At this point, the preceding position information storage unit 2302stores position information (1/4,3/8). A step width of 1/8 at the secondlayer obtained by the step width decoding unit 2305 is added to thevalue of the second layer as the branch layer in the stored positioninformation, and as a result, position information (1/4,1/2) is decoded.The position represented by the position information (1/4,1/2) is not adeficient position, and the position information is output outward asdecoded position information while also being stored in the precedingposition information storage unit 2302. Even if a deficient position ispresent in this way, correct position information is decoded andobtained.

The decoding process of the position information code string of FIG. 21is described below.

The process up to decoding the position information (1/4,3/4) isidentical to the above-described decoding process of FIG. 18. Afterinitial position information (1/4,1/4) in the position information codestring of FIG. 21 is decoded, the step width decoding unit 2305 decodesa step width of 1/4 at the first layer and a step width of 1/4 at thesecond layer. In response to position information codes “10” and “10” tobe read, position information (1/4,1/2) and (1/4,3/4) is successivelydecoded and output.

The branch layer determining unit 2303 reads the position informationcode “01”. The position information code “01” indicates that the firstlayer is the branch layer.

The position information code string of FIG. 21 is encoded so that a newstep width is encoded for a layer below a branch layer when the branchlayer is determined. If the first layer is a branch layer, a step widthfor the second layer is encoded and provided. Therefore, when it isdetermined that the first layer is the branch layer, the step widthdecoding unit 2305 reads a 5 bit code as a step width of the secondlayer, thereby decoding a new second layer step width of 1/8.

A new step width is not decoded with the second layer being the branchlayer in the above example because no layer is present below the secondlayer. The two layers, namely, the first layer and the second layer, areused in the above example. If a first layer is determined as being abranch layer in a three-layer structure of the first through thirdlayers, codes of the encoded step widths of the second layer and thethird layer following the first layer are decoded. More specifically,the step widths of the layers below the branch layer are decoded. Thesame is true even if the number of layers is increased.

The preceding position information storage unit 2302 stores positioninformation (1/4,3/4). The differential position information decodingunit 2304 adds a step width of 1/4 at the first layer obtained in thestep width decoding unit 2305 to the value of the first layer as thebranch layer in the stored position information. A step width of 1/8 atthe second layer newly decoded by the step width decoding unit 2305 isimparted to the second layer below the branch layer as an initial value.Position information (1/2,1/8) is thus decoded and obtained.

The decoded position information (1/2,1/8) is output while being inputinto and stored in the preceding position information storage unit 2302.The branch layer determining unit 2303 reads a position information code“10” indicating that the second layer is the branch layer. Thedifferential position information decoding unit 2304 adds a step widthof 1/8 at the second layer to the position information (1/2,1/8) storedin the preceding position information storage unit 2302, therebydecoding next position information (1/2,1/4).

After the position information (1/2,3/8) and (1/2,1/2) is decoded, anend code “11” is read and the decoding process ends.

If a tree having variations in assignments of values of positioninformation from branch to branch is encoded, the method of FIG. 21 ofencoding/decoding the step width at each branching reduces the effect ofdrop in encoding efficiency in comparison with the method of FIG. 20using the deficiency code. The step width to be encoded/decoded in theabove-referenced embodiments serves as an incremental width in the valueof position information and an initial value of the positioninformation. In accordance with the present invention, with theincremental width and the initial value commonly serving as the stepwidth, the drop in the encoding efficiency is reduced while the positioninformation in the rational number representation is difference encoded.Alternatively, the step width and the initial value may be separatelyencoded. In this case, the step widths and the initial position value atthe layers below the branch layer are encoded/decoded in contrast to theembodiment discussed with reference to FIG. 21 where the step widths atthe layers below the branch layer are encoded/decoded. In this manner,when there is a difference between the initial position value and thestep width, the encoding/decoding process is performed with lossminimized.

In an extreme case, the step widths are encoded at the same time for allposition information codes, and then the encoded step widths areattached. A differential encoding/decoding method for encoding/decodingthe position information with the step width flexibly changed is thusprovided.

FIG. 24 is a flowchart illustrating the position information decodingmethod of the second embodiment of the present invention, in particular,the position information decoding method corresponding to the operationof the decoding device discussed with reference to an example of theposition information code string of FIGS. 18 and 20.

The position information decoding method of the second embodiment of thepresent invention of FIG. 24 is modified from the position informationdecoding method of the first embodiment of the present invention of FIG.16. More specifically, in the position information decoding method ofthe second embodiment of the present invention of FIG. 24, a positioninformation rearranging step (step S29) is eliminated, a step widthdecoding step (step S52) is added, and a differential positioninformation decoding step (step S57) based on the step width obtainedthrough decoding is included as a modification to the differentialposition information decoding step (step S26). The rest of the processof the position information decoding method is identical to the positioninformation decoding method of the first embodiment, and steps S21, S22,S23, S24, S25, S27, and S28 of FIG. 16 correspond to steps S51, S53,S54, S55, S56, S58, and S59 of FIG. 24, respectively.

In the aforementioned discussion, the position information encodingdevice comprising the position information rearranging unit 101 inaccordance with the first embodiment of the present invention isdifferent from the position information encoding device comprising thestep width determining unit 1701 and the step width encoding unit 1706in accordance with the second embodiment of the present invention.Alternatively, one position information encoding device may contain allthese functional blocks. Prepared in such an arrangement is a flagindicating whether an encoding process involving the rearrangement ofthe position information (the process of the position informationrearranging unit 101) or an encoding process involving the encoding ofthe step width (the process of the step width determining unit 1701 andthe step width encoding unit 1706) is performed. The value of the flagis recorded together with the position information code string.Alternatively, the value of the flag can be recorded as attributeinformation of the position information code string in a stream or afile separate from the position information code string.

The position information decoding device including the positioninformation rearranging unit 1105 in accordance with the firstembodiment of the present invention and the position informationdecoding device including the step width decoding unit 2305 inaccordance with the second embodiment of the present invention areembodied as separate devices. Alternatively, one position informationdecoding device can contain all these functional blocks. Such a positioninformation decoding device receives the flag recorded by the positioninformation encoding device, and switches between the decoding operationinvolving the rearrangement process (the process of the positioninformation rearranging unit 1105) and the decoding operation involvingthe decoding of the step width (the process of the step width decodingunit 2305).

As previously discussed, by performing the rearrangement process, theposition information encoding device and the position informationdecoding device in accordance with the first embodiment of the presentinvention encode/decode the position information using the differentialencoding in the same manner as the integer number position informationis encoded/decoded, even if the position information is represented inthe rational numbers having the order relationship from which updatevalues are not uniquely identified. The position information encodingdevice and the position information decoding device in accordance withthe second embodiment of the present invention encode the step width andrecord the encoded step width together with the position informationcode. The differential encoding can thus performed with the orderrelationship of the original position information maintained. Theencoding/decoding process of the position information is performed in anintuitively understandable manner. By using the flag for switching, anappropriate encoding method is selected and used depending onsituations.

The position information encoding method including the positioninformation rearranging step S1 in accordance with the first embodimentis separate from the position information encoding method including thestep width encoding step S32 in accordance with the second embodiment.Alternatively, a position information encoding method including thesesteps can be arranged. The position information decoding methodincluding the position information rearranging step S29 in accordancewith the first embodiment is separate from the position informationdecoding method including the step width decoding step S52 in accordancewith the second embodiment. Alternatively, a position informationdecoding method including these steps can be arranged.

The position information encoding device, the position informationencoding method, the position information decoding device, and theposition information decoding method in accordance with the embodimentsof the present invention have been discussed. The present invention canbe embodied as a program for causing a computer as the devices (theencoding device and/or the decoding device) of the above-referencedembodiments or as a program for causing a computer to perform the stepsof each of the methods of the above-referenced embodiments (the encodingmethod and/or the decoding method), or a computer readable recordingmedium recording each of the programs.

A program installed in the computer to cause the computer to perform asthe device of the present invention can be easily embodied so that CPUor MPU of the computer functions as the elements of each device(corresponding to respective means) or so that the CPU or the MPUperforms each step in each of the above-described methods.

FIG. 25 illustrates the structure example of an ordinary informationprocessing device shown to explain the device of the present invention.

The process of the device of the position information for processingeach pieces of information is described below with reference to thestructure example of the ordinary information processing device of FIG.25. Information handled by the device of the present invention istemporarily stored in RAM 2502 at the moment of the process, and thenstored as structural data in an image database in ROM 2503. The programfor causing the computer to function as the device of the presentinvention is stored in ROM 2503, and then read by a CPU 2501 forexecution. An intermediate report and intermediate results of theprocess are displayed on a display 2505 for a user. If necessary, theuser can input parameters required for the process using a keyboard, ora mouse (pointing device). The program comprises preferably a graphicaluser interface for the display 2505 so that the user may easily inputthe parameters. Intermediate data produced during execution of anotherprocess is also stored in the RAM 2502, and the CPU 2501 reads,modifies, and writes the intermediate data as necessary. The CPU 2501,the RAM 2502, the ROM 2503, an input unit 2504, the display (CRT, LCD,or the like) 2505, and an output unit (printer, communication unit, orthe like) 2506 are interconnected via a bus 2507, or portions of therespective elements can be interconnected via a network such as a LAN.The communication unit exchanges data with another device via acommunication line.

Embodiments of the recording medium storing program and data forperforming the encoding/decoding functions of the position informationin accordance with the present invention are described below. Morespecifically, the recording media include a CD-ROM, a magneto opticaldisk, DVD-ROM, FD, a flash memory, a memory stick, a variety of ROMs,and a variety of RAMs. The recording medium storing the program forcausing the computer to perform the functions of encoding/decodingposition information of the device of each of the embodiments of thepresent invention is supplied to perform the function of the device.With the above-described recording medium loaded onto the informationprocessing device such as the computer, the information processingdevice reads the program, or the program is stored onto the recordingmedium of the information processing device, and is read as necessary.The encoding/decoding functions for encoding/decoding the positioninformation in accordance with the present invention are thus performed.

1. An encoding device for encoding a plurality of pieces of positioninformation corresponding to a plurality of leaves and/or nodes at acommon layer in a tree structure, comprising: a rearranging unit forrearranging, in accordance with a predetermined order relationship, theplurality of pieces of position information to be encoded, a determiningunit for determining, in accordance with the predetermined orderrelationship, a branch layer of two consecutive pieces of positioninformation from among the plurality of pieces of position informationoutput from the rearranging unit, and an encoding unit for outputting acode corresponding to the branch layer, wherein the plurality of piecesof position information are rational number position informationrepresented by a rational number, and wherein the predetermined orderrelationship is determined by an order of magnitude of resolution of therational number.
 2. The encoding device according to claim 1, whereinthe tree structure represents search information, and wherein the leavesor nodes corresponding to the plurality of pieces of positioninformation to be encoded correspond to elements of the same typecontained in the search information.
 3. An encoding device for encodinga plurality of pieces of position information corresponding to aplurality of leaves and/or nodes at a common layer in a tree structure,the plurality of pieces of position information to be encoded beingarranged in accordance with a predetermined order relationship,comprising: a determining unit for determining, in accordance with thepredetermined order relationship, a branch layer of two consecutivepieces of position information from among the plurality of pieces ofposition information to be encoded, and an encoding unit for outputtinga code corresponding to the branch layer, wherein the plurality ofpieces of position information are rational number position informationrepresented by a rational number, and wherein the predetermined orderrelationship is determined by an order of magnitude of resolution of therational number.
 4. The encoding device according to claim 1 or 3,wherein each rational number is equal to a natural number over the powerof
 2. 5. An encoding method for encoding a plurality of pieces ofposition information corresponding to a plurality of leaves and/or nodesat a common layer in a tree structure, comprising: a rearranging step ofrearranging, in accordance with a predetermined order relationship, theplurality of pieces of position information to be encoded, a determiningstep of determining, in accordance with the predetermined orderrelationship, a branch layer of two consecutive pieces of positioninformation from among the plurality of pieces of position informationoutput in the rearranging step, and an encoding step of outputting acode corresponding to the branch layer using an encoding unit, whereinthe plurality of position information are rational number positioninformation represented by a rational number, and wherein thepredetermined order relationship is determined by an order of magnitudeof resolution of the rational number.
 6. The encoding method accordingto claim 5, wherein the tree structure represents search information,and wherein the leaves or nodes corresponding to the plurality of piecesof position information to be encoded correspond to elements of the sametype contained in the search information.
 7. The encoding method ofclaim 5, wherein the plurality of pieces of position information to beencoded are retrieved from a storage unit by said encoding unit.
 8. Anencoding method for encoding a plurality of pieces of positioninformation corresponding to a plurality of leaves and/or nodes at acommon layer in a tree structure, the plurality of pieces of positioninformation to be encoded being arranged in accordance with apredetermined order relationship, comprising: a determining step ofdetermining, in accordance with the predetermined order relationship, abranch layer of two consecutive pieces of position information fromamong the plurality of pieces of position information to be encoded, andan encoding step of outputting a code corresponding to the branch layerusing an encoding unit, wherein the plurality of position informationare rational number position information represented by a rationalnumber, and wherein the predetermined order relationship is determinedby an order of magnitude of resolution of the rational number.
 9. Theencoding method of claim 8, wherein the plurality of pieces of positioninformation to be encoded are retrieved from a storage unit by saidencoding unit.
 10. The encoding method according to claim 5 or 8,wherein each rational number is equal to a natural number over the powerof
 2. 11. A decoding device for decoding a string of positioninformation code composed of a plurality of pieces of encoded positioninformation corresponding to a plurality of leaves and/or nodes at acommon layer in a tree structure, comprising: a storage unit forsuccessively storing decoded position information, a determining unitfor determining a branch layer of two consecutive pieces of positioninformation based on the position information code, and a decoding unitfor updating the value of the position information, stored in thestorage unit, corresponding to the branch layer by one notch inaccordance with a predetermined order relationship, wherein theplurality of pieces of position information are rational number positioninformation represented by a rational number, and wherein thepredetermined order relationship is determined by an order of magnitudeof resolution of the rational number.
 12. The decoding device accordingto claim 11, further comprising rearranging unit for rearranging theplurality of pieces of decoded position information in accordance withthe order of magnitude.
 13. The decoding device according to claim 12,further comprising calculating unit for calculating a serial numberassigned to each piece of decoded position information, the serialnumber representing the order of magnitude.
 14. The decoding deviceaccording to claim 11, wherein the tree structure represents searchinformation, and wherein the leaves or nodes corresponding to theposition information to be decoded correspond to elements of the sametype contained in the search information.
 15. The decoding deviceaccording to claim 11, wherein each rational number is equal to anatural number over the power of
 2. 16. A decoding method for decoding astring of position information code composed of a plurality of pieces ofencoded position information corresponding to a plurality of leavesand/or nodes at a common layer in a tree structure, comprising: astorage step of successively storing decoded position information in astorage unit, a determining step of determining a branch layer of twoconsecutive pieces of position information based on the positioninformation code, and a decoding step of updating the value of theposition information, stored in the storage unit, corresponding to thebranch layer by one notch in accordance with a predetermined orderrelationship using a decoding unit, wherein the plurality of pieces ofposition information are rational number position informationrepresented by a rational number, and wherein the predetermined orderrelationship is determined by an order of magnitude of resolution of therational number.
 17. The decoding method according to claim 16, furthercomprising a rearranging step of rearranging the plurality of pieces ofdecoded position information in accordance with the order of magnitude.18. The decoding method according to claim 17, wherein the rearrangingstep further comprises a calculating step of calculating a serial numberassigned to each piece of decoded position information, the serialnumber representing the order of magnitude.
 19. The decoding methodaccording to claim 16, wherein the tree structure represents searchinformation, and wherein the leaves or nodes corresponding to theposition information to be decoded correspond to elements of the sametype contained in the search information.
 20. The decoding methodaccording to claim 16, wherein each rational number is equal to anatural number over the power of
 2. 21. A computer readable recordingmedium having stored thereon a computer program that, when executed,performs: a rearranging step of rearranging, in accordance with apredetermined order relationship, the plurality of pieces of positioninformation to be encoded, a determining step of determining, inaccordance with the predetermined order relationship, a branch layer oftwo consecutive pieces of position information from among the pluralityof pieces of position information output in the rearranging step, and anencoding step of outputting a code corresponding to the branch layer,wherein the plurality of pieces of position information are rationalnumber position information represented by a rational number, andwherein the predetermined order relationship is determined by an orderof magnitude of resolution of the rational number.
 22. A computerreadable recording medium having stored thereon a computer program that,when executed, performs: a storage step of successively storing decodedposition information, a determining step of determining a branch layerof two consecutive pieces of position information based on the positioninformation code, and a decoding step of updating the value of theposition information, stored in the storage step, corresponding to thebranch layer by one notch in accordance with a predetermined orderrelationship, wherein the plurality of pieces of position informationare rational number position information represented by a rationalnumber, and wherein the predetermined order relationship is determinedby an order of magnitude of resolution of the rational number.